From 6eca679a38f71be6583abc6a67a6271b3af6e4bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com> Date: Mon, 17 Jan 2022 19:14:45 +0100 Subject: [PATCH] app:fix --- lib/tasks/app.rake | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/tasks/app.rake b/lib/tasks/app.rake index 95f457320..7882b1afa 100644 --- a/lib/tasks/app.rake +++ b/lib/tasks/app.rake @@ -21,11 +21,6 @@ namespace :app do Education::Program.find_each { |p| p.update_column :path, "#{p.parent&.path}/#{p.slug}".gsub(/\/+/, '/') } end - Communication::Website.all.find_each { |website| - website.update_column(:authors_github_directory, "auteurs") if website.authors_github_directory.blank? - website.update_column(:posts_github_directory, "actualites") if website.posts_github_directory.blank? - } - Communication::Website::Post.find_each do |post| post.categories = post.categories.select { |category| category.children.none? { |child| post.categories.include?(child) } } end @@ -38,8 +33,12 @@ namespace :app do }) end end - Research::Journal::Volume.find_each do |volume| - volume.update_column :published, volume.published_at.present? + + # MICA & Class'Code + Communication::Website.where(id: ["6dfb358c-21bc-440f-9156-e09b72671c32", "1bb0f013-4d3d-49be-84bc-087c8cff3c77"]).each do |website| + website.imported_website.posts.find_each do |imported_post| + imported_post.post&.update_column :published_at, imported_post.published_at + end end end -- GitLab