User should not be deleted if they have hidden dossiers with state_instruction_commencee
fix #4933
This commit is contained in:
parent
ed0441176b
commit
08a5dd6a27
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ class User < ApplicationRecord
|
|||
end
|
||||
|
||||
def can_be_deleted?
|
||||
administrateur.nil? && instructeur.nil? && dossiers.state_instruction_commencee.empty?
|
||||
administrateur.nil? && instructeur.nil? && dossiers.with_discarded.state_instruction_commencee.empty?
|
||||
end
|
||||
|
||||
def delete_and_keep_track_dossiers(administration)
|
||||
|
|
Loading…
Reference in a new issue