fix: mail or error only on created

This commit is contained in:
Jean-Baptiste Pasquier 2019-08-16 15:35:58 +02:00
parent fd1f78119b
commit 6b9e8162a0
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
1 changed files with 2 additions and 1 deletions

View File

@ -94,4 +94,5 @@ def send_email_on_notification(sender, instance, created, **kwargs):
html_message=html_message html_message=html_message
) )
else: else:
raise Exception('Misconfiguration, missing JABBER_DEFAULT_HOST or incomplete instance') if created:
raise Exception('Misconfiguration, missing JABBER_DEFAULT_HOST or incomplete instance')