diff --git a/frappe/email/doctype/notification/notification.py b/frappe/email/doctype/notification/notification.py index 18ec760c77..df4b7ad44c 100644 --- a/frappe/email/doctype/notification/notification.py +++ b/frappe/email/doctype/notification/notification.py @@ -169,9 +169,11 @@ def get_context(context): attachments = self.get_attachment(doc) recipients, cc, bcc = self.get_list_of_recipients(doc, context) - if not (recipients or cc or bcc): - return + users = recipients + cc + bcc + + if not users: + return notification_doc = { 'type': 'Alert', @@ -277,8 +279,6 @@ def get_context(context): if self.send_to_all_assignees: recipients = recipients + get_assignees(doc) - if not recipients and not cc and not bcc: - return None, None, None return list(set(recipients)), list(set(cc)), list(set(bcc)) def get_receiver_list(self, doc, context): @@ -428,4 +428,4 @@ def get_assignees(doc): recipients = [d.owner for d in assignees] - return recipients \ No newline at end of file + return recipients