fix(dossier): do not send notification on expiration when dossier is already deleted
This commit is contained in:
parent
d1a941d908
commit
3d8471e064
2 changed files with 23 additions and 0 deletions
|
@ -117,6 +117,7 @@ class ExpiredDossiersDeletionService
|
|||
|
||||
def self.group_by_user_email(dossiers, notify_on_closed_procedures_to_user: false)
|
||||
dossiers
|
||||
.visible_by_user
|
||||
.with_notifiable_procedure(notify_on_closed: notify_on_closed_procedures_to_user)
|
||||
.includes(:user, :procedure)
|
||||
.group_by(&:user)
|
||||
|
@ -125,6 +126,7 @@ class ExpiredDossiersDeletionService
|
|||
|
||||
def self.group_by_fonctionnaire_email(dossiers)
|
||||
dossiers
|
||||
.visible_by_administration
|
||||
.with_notifiable_procedure(notify_on_closed: true)
|
||||
.includes(:followers_instructeurs, procedure: [:administrateurs])
|
||||
.each_with_object(Hash.new { |h, k| h[k] = Set.new }) do |dossier, h|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue