Skip to content
Snippets Groups Projects
Unverified Commit 72961f84 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

fix

parent 71cddd07
No related branches found
No related tags found
No related merge requests found
......@@ -75,11 +75,12 @@ class Communication::Website::Imported::Post < ApplicationRecord
website: website.website # Real website, not imported website
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
end
# 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
title = Wordpress.clean title.to_s
puts "Update post #{post.id}"
post.title = title unless title.blank? # If there is no title, leave it with "Untitled"
......
......@@ -22,6 +22,9 @@ namespace :app do
Communication::Website::Post.find_each { |post|
post.update(text: post.old_text)
}
Communication::Website::Medium.find_each { |medium|
medium.send(:set_featured_images)
}
end
namespace :db do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment