From 4aae6de1010fb7b24be08ca68d81776ee87abaf1 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 22 Nov 2023 17:15:51 +0100 Subject: [PATCH] correctif(chorus.export): suite a un refacto, c'etait kc --- app/models/dossier.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 3bf8597dc2a..2333da7cbe6 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -1226,11 +1226,12 @@ def spreadsheet_columns(with_etablissement: false, types_de_champ:) columns << ['Entreprise raison sociale', etablissement&.entreprise_raison_sociale] end - if procedure.chorusable? && procedure.chorus.complete? + # byebug + if procedure.chorusable? && procedure.chorus_configuration.complete? columns += [ - ['Domaine Fonctionnel', procedure.chorus_configuration.domaine_fonctionnel.code], - ['Référentiel De Programmation', procedure.chorus_configuration.referentiel_de_programmation.code], - ['Centre De Coup', procedure.chorus_configuration.centre_de_cout.code] + ['Domaine Fonctionnel', procedure.chorus_configuration.domaine_fonctionnel&.fetch("code") { '' }], + ['Référentiel De Programmation', procedure.chorus_configuration.referentiel_de_programmation&.fetch("code") { '' }], + ['Centre De Coup', procedure.chorus_configuration.centre_de_cout&.fetch("code") { '' }] ] end columns += [