Browse Source

[minor] don't parse the address if email field is empty (#3675)

version-14
Makarand Bauskar 8 years ago
committed by GitHub
parent
commit
9540443438
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      frappe/email/doctype/email_group/email_group.py

+ 1
- 1
frappe/email/doctype/email_group/email_group.py View File

@@ -26,7 +26,7 @@ class EmailGroup(Document):


for user in frappe.db.get_all(doctype, [email_field, unsubscribed_field or "name"]): for user in frappe.db.get_all(doctype, [email_field, unsubscribed_field or "name"]):
try: try:
email = parse_addr(user.get(email_field))[1]
email = parse_addr(user.get(email_field))[1] if user.get(email_field) else None
if email: if email:
frappe.get_doc({ frappe.get_doc({
"doctype": "Email Group Member", "doctype": "Email Group Member",


Loading…
Cancel
Save