Merge pull request #8521 from Thunderbottom/notification-mail-fix

fix(notifications): do not send emails if no recipients
This commit is contained in:
mergify[bot] 2019-09-30 10:38:38 +00:00 committed by GitHub
commit 1e54db0df5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -143,6 +143,8 @@ def get_context(context):
attachments = self.get_attachment(doc)
recipients, cc, bcc = self.get_list_of_recipients(doc, context)
if not recipients:
return
sender = None
if self.sender and self.sender_email:
sender = formataddr((self.sender, self.sender_email))