From 58a90eb4a6e2fab0a0214db830a0cf293b502583 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Tue, 11 May 2021 14:53:41 +0200 Subject: [PATCH] fix update_all query --- .../20210429172327_rename_conservation_extension.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/deployment/20210429172327_rename_conservation_extension.rake b/lib/tasks/deployment/20210429172327_rename_conservation_extension.rake index 4d4235185..41a828c6a 100644 --- a/lib/tasks/deployment/20210429172327_rename_conservation_extension.rake +++ b/lib/tasks/deployment/20210429172327_rename_conservation_extension.rake @@ -8,7 +8,7 @@ namespace :after_party do dossiers = Dossier.state_en_construction.where.not(en_construction_conservation_extension: 0.days) progress = ProgressReport.new((dossiers.count.to_f / BATCH_SIZE).round) dossiers.in_batches(of: BATCH_SIZE) do |relation| - relation.update_all("dossiers.conservation_extension = dossiers.en_construction_conservation_extension") + relation.update_all("conservation_extension = en_construction_conservation_extension") progress.inc end progress.finish