From 0b2bc68d483e36cf3080ddd8173bf354641242d3 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Fri, 1 Nov 2024 22:22:40 +0100 Subject: [PATCH] remove unused `type_de_champ_private` string --- app/services/dossier_projection_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/dossier_projection_service.rb b/app/services/dossier_projection_service.rb index 0577d93a5..7cf8d88ca 100644 --- a/app/services/dossier_projection_service.rb +++ b/app/services/dossier_projection_service.rb @@ -68,7 +68,7 @@ class DossierProjectionService .group_by { |f| f[TABLE] } # one query per table .each do |table, fields| case table - when 'type_de_champ', 'type_de_champ_private' + when 'type_de_champ' Champ .where( stable_id: fields.map { |f| f[STABLE_ID] }, @@ -183,7 +183,7 @@ class DossierProjectionService private def champ_value_formatter(dossiers_ids, fields) - stable_ids = fields.filter { _1[TABLE].in?(['type_de_champ', 'type_de_champ_private']) }.map { _1[STABLE_ID] } + stable_ids = fields.filter { _1[TABLE].in?(['type_de_champ']) }.map { _1[STABLE_ID] } revision_ids_by_dossier_ids = Dossier.where(id: dossiers_ids).pluck(:id, :revision_id).to_h stable_ids_and_types_de_champ_by_revision_ids = ProcedureRevisionTypeDeChamp.includes(:type_de_champ) .where(revision_id: revision_ids_by_dossier_ids.values.uniq, type_de_champ: { stable_id: stable_ids })