Hook: setup_wizard_success

This commit is contained in:
Anand Doshi 2014-05-21 15:22:15 +05:30
parent d2802cab6c
commit d6007e7d9c

View File

@ -76,6 +76,7 @@ def setup_account(args=None):
frappe.clear_cache() frappe.clear_cache()
frappe.db.commit() frappe.db.commit()
except: except:
traceback = frappe.get_traceback() traceback = frappe.get_traceback()
for hook in frappe.get_hooks("setup_wizard_exception"): for hook in frappe.get_hooks("setup_wizard_exception"):
@ -83,6 +84,11 @@ def setup_account(args=None):
raise raise
else:
for hook in frappe.get_hooks("setup_wizard_success"):
frappe.get_attr(hook)(args)
def update_user_name(args): def update_user_name(args):
if args.get("email"): if args.get("email"):
args['name'] = args.get("email") args['name'] = args.get("email")