From 084e48c8e3c5ef1de1882c909e51ea3442db6df0 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Tue, 7 Sep 2021 14:07:55 +0200 Subject: [PATCH] fix(dossier_projection_service): select external_id on champs --- app/services/dossier_projection_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/dossier_projection_service.rb b/app/services/dossier_projection_service.rb index 8a2a43ed5..c88c5a7e9 100644 --- a/app/services/dossier_projection_service.rb +++ b/app/services/dossier_projection_service.rb @@ -33,7 +33,7 @@ class DossierProjectionService types_de_champ: { stable_id: fields.map { |f| f[COLUMN] } }, dossier_id: dossiers_ids ) - .select(:dossier_id, :value, :type_de_champ_id, :stable_id, :type, :data) # we cannot pluck :value, as we need the champ.to_s method + .select(:dossier_id, :value, :type_de_champ_id, :stable_id, :type, :external_id, :data) # we cannot pluck :value, as we need the champ.to_s method .group_by(&:stable_id) # the champs are redispatched to their respective fields .map do |stable_id, champs| field = fields.find { |f| f[COLUMN] == stable_id.to_s }