From c5f8aa2e0d79aad070c313d559173e859bf9e297 Mon Sep 17 00:00:00 2001 From: Frederic Merizen Date: Thu, 28 Mar 2019 17:45:07 +0100 Subject: [PATCH] [#2180] Fix updated_at for migration PJ champs --- ...e_justificative_to_champ_piece_jointe_migration_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/piece_justificative_to_champ_piece_jointe_migration_service.rb b/app/services/piece_justificative_to_champ_piece_jointe_migration_service.rb index 5d2ace62ec5..0778454f3e4 100644 --- a/app/services/piece_justificative_to_champ_piece_jointe_migration_service.rb +++ b/app/services/piece_justificative_to_champ_piece_jointe_migration_service.rb @@ -37,12 +37,12 @@ def populate_champs_pjs!(procedure, types_de_champ_pj) pj = dossier.retrieve_last_piece_justificative_by_type(type_pj_id) if pj.present? + convert_pj_to_champ!(pj, champ) + champ.update( updated_at: pj.updated_at, created_at: pj.created_at ) - - convert_pj_to_champ!(pj, champ) else champ.update( updated_at: dossier.updated_at,