fix(administrateur): can be deleted only if other admin or dossiers on all procedures included with discarded
This commit is contained in:
parent
7746f2d660
commit
6a77bbb6c9
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ class Administrateur < ApplicationRecord
|
|||
end
|
||||
|
||||
def can_be_deleted?
|
||||
procedures.all? { |p| p.administrateurs.count > 1 || p.dossiers.empty? }
|
||||
procedures.with_discarded.all? { |p| p.administrateurs.count > 1 || p.dossiers.empty? }
|
||||
end
|
||||
|
||||
def delete_and_transfer_services
|
||||
|
|
Loading…
Reference in a new issue