Merge pull request #4937 from tchak/do-not-delete-users-with-hidden-dossiers
User should not be deleted if they have hidden dossiers with state_instruction_commencee
This commit is contained in:
commit
d9145545ca
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