diff --git a/frappe/email/doctype/email_group/email_group.py b/frappe/email/doctype/email_group/email_group.py index 23495b2d70..b19a134713 100755 --- a/frappe/email/doctype/email_group/email_group.py +++ b/frappe/email/doctype/email_group/email_group.py @@ -68,8 +68,7 @@ def add_subscribers(name, email_list): email_list = email_list.replace(",", "\n").split("\n") template = frappe.db.get_value('Email Group', name, 'welcome_email_template') - if template: - welcome_email = frappe.get_doc("Email Template", template) + welcome_email = frappe.get_doc("Email Template", template) if template else None count = 0 for email in email_list: @@ -108,4 +107,4 @@ def send_welcome_email(welcome_email, email, email_group): ) message = frappe.render_template(welcome_email.response, args) - frappe.sendmail(email, subject=welcome_email.subject, message=message) \ No newline at end of file + frappe.sendmail(email, subject=welcome_email.subject, message=message)