From fc2fdbe42613a6931fc300f7dc8407b6dfd7b39c Mon Sep 17 00:00:00 2001 From: prssanna Date: Wed, 16 Sep 2020 15:05:28 +0530 Subject: [PATCH] fix: handle None value in recipients while sending system notification --- frappe/email/doctype/notification/notification.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frappe/email/doctype/notification/notification.py b/frappe/email/doctype/notification/notification.py index 5355d56b35..18ec760c77 100644 --- a/frappe/email/doctype/notification/notification.py +++ b/frappe/email/doctype/notification/notification.py @@ -167,7 +167,10 @@ def get_context(context): subject = frappe.render_template(self.subject, 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 notification_doc = {