manager: fix the deletion email not being sent (#4097)
Manager : corrige l'email notifiant la suppression, qui n'était plus envoyé à l'usager
This commit is contained in:
commit
216aabf55b
2 changed files with 3 additions and 3 deletions
|
@ -22,9 +22,8 @@ module Manager
|
|||
|
||||
def hide
|
||||
dossier = Dossier.find(params[:id])
|
||||
deleted_dossier = dossier.hide!(current_administration)
|
||||
dossier.hide!(current_administration)
|
||||
|
||||
DossierMailer.notify_deletion_to_user(deleted_dossier, dossier.user.email).deliver_later
|
||||
logger.info("Le dossier #{dossier.id} est supprimé par #{current_administration.email}")
|
||||
flash[:notice] = "Le dossier #{dossier.id} est supprimé"
|
||||
|
||||
|
|
|
@ -412,7 +412,8 @@ class Dossier < ApplicationRecord
|
|||
def hide!(administration)
|
||||
update(hidden_at: Time.zone.now)
|
||||
|
||||
DeletedDossier.create_from_dossier(self)
|
||||
deleted_dossier = DeletedDossier.create_from_dossier(self)
|
||||
DossierMailer.notify_deletion_to_user(deleted_dossier, user.email).deliver_later
|
||||
log_dossier_operation(administration, :supprimer, self)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue