From 01248022bfe40573fa85818e1ac2e451a1d65e81 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 20 Jul 2020 16:35:44 +0200 Subject: [PATCH] models: require belong_to associations on deleted_dossier --- app/models/deleted_dossier.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/deleted_dossier.rb b/app/models/deleted_dossier.rb index 5f93ad4bc..5418b370d 100644 --- a/app/models/deleted_dossier.rb +++ b/app/models/deleted_dossier.rb @@ -12,7 +12,7 @@ # procedure_id :bigint # class DeletedDossier < ApplicationRecord - belongs_to :procedure, -> { with_discarded }, inverse_of: :deleted_dossiers + belongs_to :procedure, -> { with_discarded }, inverse_of: :deleted_dossiers, optional: false validates :dossier_id, uniqueness: true