Merge pull request #8521 from Thunderbottom/notification-mail-fix
fix(notifications): do not send emails if no recipients
This commit is contained in:
commit
1e54db0df5
1 changed files with 2 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue