From fe0a396dc63927eaf50a9a4a3cf26da1306422ff Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Thu, 21 Nov 2024 10:55:11 +0100 Subject: [PATCH] refactor: remove unused individual prenom / nom load because of bb236f6c0d2703f51d353bb9952a6d01d80aab7e --- app/services/dossier_projection_service.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/services/dossier_projection_service.rb b/app/services/dossier_projection_service.rb index 3c3f2a438..65a531ed1 100644 --- a/app/services/dossier_projection_service.rb +++ b/app/services/dossier_projection_service.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class DossierProjectionService - class DossierProjection < Struct.new(:dossier_id, :state, :archived, :hidden_by_user_at, :hidden_by_administration_at, :hidden_by_reason, :for_tiers, :prenom, :nom, :batch_operation_id, :sva_svr_decision_on, :corrections, :columns) do + class DossierProjection < Struct.new(:dossier_id, :state, :archived, :hidden_by_user_at, :hidden_by_administration_at, :hidden_by_reason, :for_tiers, :batch_operation_id, :sva_svr_decision_on, :corrections, :columns) do def pending_correction? return false if corrections.blank? @@ -58,12 +58,10 @@ class DossierProjectionService hidden_by_administration_at_field = { TABLE => 'self', COLUMN => 'hidden_by_administration_at' } hidden_by_reason_field = { TABLE => 'self', COLUMN => 'hidden_by_reason' } for_tiers_field = { TABLE => 'self', COLUMN => 'for_tiers' } - individual_first_name = { TABLE => 'individual', COLUMN => 'prenom' } - individual_last_name = { TABLE => 'individual', COLUMN => 'nom' } sva_svr_decision_on_field = { TABLE => 'self', COLUMN => 'sva_svr_decision_on' } dossier_corrections = { TABLE => 'dossier_corrections', COLUMN => 'resolved_at' } - ([state_field, archived_field, sva_svr_decision_on_field, hidden_by_user_at_field, hidden_by_administration_at_field, hidden_by_reason_field, for_tiers_field, individual_first_name, individual_last_name, batch_operation_field, dossier_corrections] + fields) + ([state_field, archived_field, sva_svr_decision_on_field, hidden_by_user_at_field, hidden_by_administration_at_field, hidden_by_reason_field, for_tiers_field, batch_operation_field, dossier_corrections] + fields) .each { |f| f[:id_value_h] = {} } .group_by { |f| f[TABLE] } # one query per table .each do |table, fields| @@ -182,8 +180,6 @@ class DossierProjectionService hidden_by_administration_at_field[:id_value_h][dossier_id], hidden_by_reason_field[:id_value_h][dossier_id], for_tiers_field[:id_value_h][dossier_id], - individual_first_name[:id_value_h][dossier_id], - individual_last_name[:id_value_h][dossier_id], batch_operation_field[:id_value_h][dossier_id], sva_svr_decision_on_field[:id_value_h][dossier_id], dossier_corrections[:id_value_h][dossier_id],