Merge pull request #10426 from colinux/fix-accuse-lecture-procedure-draft

ETQ admin corrige l'acceptation de dossier d'une démarche brouillon avec accusé de lecture
This commit is contained in:
Colin Darie 2024-05-16 18:36:27 +00:00 committed by GitHub
commit c794f654ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,7 +4,7 @@ class MailTemplatePresenterService
def self.create_commentaire_for_state(dossier, state)
if dossier.procedure.accuse_lecture? && Dossier::TERMINE.include?(state)
CommentaireService.create!(CONTACT_EMAIL, dossier, body: I18n.t('layouts.mailers.accuse_lecture.commentaire_html', service: dossier.procedure.service.nom))
CommentaireService.create!(CONTACT_EMAIL, dossier, body: I18n.t('layouts.mailers.accuse_lecture.commentaire_html', service: dossier.procedure.service&.nom))
else
service = new(dossier, state)
body = ["<p>[#{service.safe_subject}]</p>", service.safe_body].join('')