From 888a70c2d49fad0eda4e3876dcfb5d9b115b4f1d Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 9 Sep 2015 15:14:16 +0530 Subject: [PATCH] [fix] Setup Wizard - the case of forgetting mute emails --- erpnext/setup/page/setup_wizard/setup_wizard.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.py b/erpnext/setup/page/setup_wizard/setup_wizard.py index f3f236d035..e578f87766 100644 --- a/erpnext/setup/page/setup_wizard/setup_wizard.py +++ b/erpnext/setup/page/setup_wizard/setup_wizard.py @@ -109,7 +109,8 @@ def setup_account(args=None): def update_user_name(args): if args.get("email"): args['name'] = args.get("email") - frappe.flags.mute_emails = True + + _mute_emails, frappe.flags.mute_emails = frappe.flags.mute_emails, True doc = frappe.get_doc({ "doctype":"User", "email": args.get("email"), @@ -118,7 +119,7 @@ def update_user_name(args): }) doc.flags.no_welcome_mail = True doc.insert() - frappe.flags.mute_emails = False + frappe.flags.mute_emails = _mute_emails from frappe.auth import _update_password _update_password(args.get("email"), args.get("password"))