Fix revision migration job
This commit is contained in:
parent
8b9e73a30a
commit
7d421d471c
1 changed files with 1 additions and 2 deletions
|
@ -8,8 +8,7 @@ class TmpDossiersMigrateRevisionsJob < ApplicationJob
|
||||||
.limit(2000)
|
.limit(2000)
|
||||||
.find_each do |dossier|
|
.find_each do |dossier|
|
||||||
if dossier.procedure.present?
|
if dossier.procedure.present?
|
||||||
dossier.revision = dossier.procedure.active_revision
|
dossier.update_column(:revision_id, dossier.procedure.active_revision_id)
|
||||||
dossier.save!(validate: false)
|
|
||||||
else
|
else
|
||||||
except << dossier.id
|
except << dossier.id
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue