[#2180] Fix updated_at for migration PJ champs

This commit is contained in:
Frederic Merizen 2019-03-28 17:45:07 +01:00
parent 2feab67dc2
commit c5f8aa2e0d

View file

@ -37,12 +37,12 @@ class PieceJustificativeToChampPieceJointeMigrationService
pj = dossier.retrieve_last_piece_justificative_by_type(type_pj_id) pj = dossier.retrieve_last_piece_justificative_by_type(type_pj_id)
if pj.present? if pj.present?
convert_pj_to_champ!(pj, champ)
champ.update( champ.update(
updated_at: pj.updated_at, updated_at: pj.updated_at,
created_at: pj.created_at created_at: pj.created_at
) )
convert_pj_to_champ!(pj, champ)
else else
champ.update( champ.update(
updated_at: dossier.updated_at, updated_at: dossier.updated_at,