Merge pull request #4018 from betagouv/fix-closed-dossiers-commentaires

Reallow automatic Commentaires for archived/closed Dossier
This commit is contained in:
Nicolas Bouilleaud 2019-07-01 12:05:54 +02:00 committed by GitHub
commit 4ae19898d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,9 +12,6 @@ class CommentaireService
end
def build_with_email(email, dossier, params)
if !dossier.messagerie_available?
raise ArgumentError, "Commentaires cannot be added to brouillons or archived Dossiers"
end
attributes = params.merge(email: email, dossier: dossier)
Commentaire.new(attributes)
end