From a9232151399426eda855769e005c474a9e08fb46 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Wed, 27 May 2020 18:44:22 +0200 Subject: [PATCH] fix fix champ etablissement --- .../deployment/20200527124112_fix_champ_etablissement.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/deployment/20200527124112_fix_champ_etablissement.rake b/lib/tasks/deployment/20200527124112_fix_champ_etablissement.rake index 68e6ae301..e7093ca81 100644 --- a/lib/tasks/deployment/20200527124112_fix_champ_etablissement.rake +++ b/lib/tasks/deployment/20200527124112_fix_champ_etablissement.rake @@ -11,7 +11,7 @@ namespace :after_party do dossier = e.dossier if user.dossiers.count == 1 && user.siret == e.champ.value e.update!(dossier_id: nil) - dossier.etablissement = e.dup + dossier.reload.etablissement = e.reload.dup dossier.save! dossiers_modif << dossier.id fetch_api_entreprise_infos(dossier.etablissement.id, dossier.procedure.id, user.id)