[fix] [setup wizard] ignore if user is the primary user
This commit is contained in:
parent
0c7fd6cd94
commit
08a60653ba
@ -542,13 +542,15 @@ def create_users(args):
|
||||
user.append_roles("Accounts Manager", "Accounts User")
|
||||
|
||||
user.flags.delay_emails = True
|
||||
user.insert(ignore_permissions=True)
|
||||
|
||||
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": user.name,
|
||||
"user_id": email,
|
||||
"status": "Active",
|
||||
"company": args.get("company_name")
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user