chore(dossier): can destroy dossier having dossier_batch_operations

Ça peut arriver lors des démarches en test, avec des dossiers tests
en cours d'instruction.
This commit is contained in:
Colin Darie 2023-02-07 10:27:51 +01:00
parent 7d12b2ad3b
commit 0958053c72

View file

@ -147,7 +147,7 @@ class Dossier < ApplicationRecord
belongs_to :user, optional: true
belongs_to :parent_dossier, class_name: 'Dossier', optional: true
belongs_to :batch_operation, optional: true
has_many :dossier_batch_operations
has_many :dossier_batch_operations, dependent: :destroy
has_many :batch_operations, through: :dossier_batch_operations
has_one :france_connect_information, through: :user