diff --git a/Gemfile b/Gemfile index 1f264b24e9183a4e5e225e94f8107be4a4160ee2..70d09d03344a671b67b225f620c7f1ee2987d256 100644 --- a/Gemfile +++ b/Gemfile @@ -35,6 +35,7 @@ gem 'bootstrap5-kaminari-views' gem 'octokit' gem 'front_matter_parser' gem 'two_factor_authentication', git: 'https://github.com/noesya/two_factor_authentication.git' +# gem 'two_factor_authentication', path: '../two_factor_authentication' # Front gem 'jquery-rails' diff --git a/app/models/communication/website/imported/post.rb b/app/models/communication/website/imported/post.rb index aa83a9b22543cfa942e784412879d017131792a9..16a318248c5bf234cb1731fad5561633805ed045 100644 --- a/app/models/communication/website/imported/post.rb +++ b/app/models/communication/website/imported/post.rb @@ -76,10 +76,10 @@ class Communication::Website::Imported::Post < ApplicationRecord self.post.title = "Untitled" # No title yet self.post.save else - # Don't touch if there are local changes (this would destroy some nice work) - # return if post.updated_at > updated_at - # Don't touch if there are no remote changes (this would do useless server workload) - # return if post.updated_at == updated_at + # Continue only if there are remote changes + # Don't touch if there are local changes (post.updated_at > updated_at) + # Don't touch if there are no remote changes (post.updated_at == updated_at) + # return unless updated_at > post.updated_at end puts "Update post #{post.id}" sanitized_title = Wordpress.clean self.title.to_s