From 2ba356bc6863cebbe06956026a60efe994de2db0 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 22 Aug 2024 17:40:12 +0200 Subject: [PATCH] cleanup(prefill): remove unused validation --- app/models/dossier.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 5b32be941..e2b64d26f 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -51,7 +51,6 @@ class Dossier < ApplicationRecord has_many :champs_to_destroy, -> { order(:parent_id) }, class_name: 'Champ', inverse_of: false, dependent: :destroy has_many :champs_public, -> { root.public_only }, class_name: 'Champ', inverse_of: false has_many :champs_private, -> { root.private_only }, class_name: 'Champ', inverse_of: false - has_many :prefilled_champs_public, -> { root.public_only.prefilled }, class_name: 'Champ', inverse_of: false has_many :commentaires, inverse_of: :dossier, dependent: :destroy has_many :preloaded_commentaires, -> { includes(:dossier_correction, piece_jointe_attachments: :blob) }, class_name: 'Commentaire', inverse_of: :dossier @@ -424,8 +423,6 @@ class Dossier < ApplicationRecord validates :mandataire_last_name, presence: true, if: :for_tiers? validates :for_tiers, inclusion: { in: [true, false] }, if: -> { revision&.procedure&.for_individual? } - validates_associated :prefilled_champs_public, on: :champs_public_value - def types_de_champ_public types_de_champ end