Merge pull request #8585 from colinux/fix-procedure-draft-delete-dossiers
fix(dossier/démarche en test): peut détruire des dossiers référencés dans des opérations de masse
This commit is contained in:
commit
ea51e7d3f5
2 changed files with 5 additions and 1 deletions
|
@ -7,6 +7,10 @@ module Administrateurs
|
|||
id = params[:procedure_id] || params[:id]
|
||||
|
||||
@procedure = current_administrateur.procedures.find(id)
|
||||
|
||||
Sentry.configure_scope do |scope|
|
||||
scope.set_tags(procedure: @procedure.id)
|
||||
end
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
flash.alert = 'Démarche inexistante'
|
||||
redirect_to admin_procedures_path, status: 404
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue