From aa5fb5e50e16a47e034a1156fd97f7695fdf0609 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 28 Jul 2015 10:31:09 +0530 Subject: [PATCH] [fix] [setup wizard] ignore if user is the primary user --- .../setup/page/setup_wizard/setup_wizard.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.py b/erpnext/setup/page/setup_wizard/setup_wizard.py index 02b7e44422..cfc8d768c9 100644 --- a/erpnext/setup/page/setup_wizard/setup_wizard.py +++ b/erpnext/setup/page/setup_wizard/setup_wizard.py @@ -546,16 +546,16 @@ def create_users(args): if not frappe.db.get_value("User", email): user.insert(ignore_permissions=True) - # create employee - emp = frappe.get_doc({ - "doctype": "Employee", - "full_name": fullname, - "user_id": email, - "status": "Active", - "company": args.get("company_name") - }) - emp.flags.ignore_mandatory = True - emp.insert(ignore_permissions = True) + # create employee + emp = frappe.get_doc({ + "doctype": "Employee", + "full_name": fullname, + "user_id": email, + "status": "Active", + "company": args.get("company_name") + }) + emp.flags.ignore_mandatory = True + emp.insert(ignore_permissions = True) @frappe.whitelist() def load_messages(language):