From 7d421d471cf6f6882bb8d51c6fba2a3452a173b7 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 23 Jul 2020 09:56:34 +0200 Subject: [PATCH] Fix revision migration job --- app/jobs/tmp_dossiers_migrate_revisions_job.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/jobs/tmp_dossiers_migrate_revisions_job.rb b/app/jobs/tmp_dossiers_migrate_revisions_job.rb index ad9e55dee..3d5bae95f 100644 --- a/app/jobs/tmp_dossiers_migrate_revisions_job.rb +++ b/app/jobs/tmp_dossiers_migrate_revisions_job.rb @@ -8,8 +8,7 @@ class TmpDossiersMigrateRevisionsJob < ApplicationJob .limit(2000) .find_each do |dossier| if dossier.procedure.present? - dossier.revision = dossier.procedure.active_revision - dossier.save!(validate: false) + dossier.update_column(:revision_id, dossier.procedure.active_revision_id) else except << dossier.id end