Merge pull request #1210 from betagouv/fix_1209-date_de_depot_in_received_mail
[#1209] Make sure date de dépôt is available before sending mail
This commit is contained in:
commit
49d5f276ae
1 changed files with 2 additions and 1 deletions
|
@ -53,8 +53,9 @@ class Users::DescriptionController < UsersController
|
||||||
redirect_to url_for(controller: :dossiers, action: :index, liste: :brouillon)
|
redirect_to url_for(controller: :dossiers, action: :index, liste: :brouillon)
|
||||||
else
|
else
|
||||||
if dossier.brouillon?
|
if dossier.brouillon?
|
||||||
NotificationMailer.send_notification(dossier, procedure.initiated_mail_template).deliver_now!
|
|
||||||
dossier.en_construction!
|
dossier.en_construction!
|
||||||
|
# TODO move to model
|
||||||
|
NotificationMailer.send_notification(dossier, procedure.initiated_mail_template).deliver_now!
|
||||||
end
|
end
|
||||||
flash.notice = 'Félicitations, votre demande a bien été enregistrée.'
|
flash.notice = 'Félicitations, votre demande a bien été enregistrée.'
|
||||||
redirect_to url_for(controller: :recapitulatif, action: :show, dossier_id: dossier.id)
|
redirect_to url_for(controller: :recapitulatif, action: :show, dossier_id: dossier.id)
|
||||||
|
|
Loading…
Reference in a new issue