task: ensure that hidden dossiers are rolled back
This commit is contained in:
parent
d71b3ade80
commit
d561936863
2 changed files with 17 additions and 1 deletions
|
@ -141,7 +141,7 @@ class PieceJustificativeToChampPieceJointeMigrationService
|
|||
# First destroy all the individual champs on dossiers
|
||||
type_champ.champ.each do |champ|
|
||||
begin
|
||||
destroy_champ_pj(champ.dossier.reload, champ)
|
||||
destroy_champ_pj(Dossier.unscope(where: :hidden_at).find(champ.dossier_id), champ)
|
||||
rescue => e
|
||||
rake_puts e
|
||||
rake_puts "Rolling back of champ #{champ.id} failed. Continuing to roll back…"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue