[setup-wizard] don't catch duplicate
This commit is contained in:
parent
750ceedbc1
commit
05e39992d0
@ -169,12 +169,4 @@ def install(country=None):
|
||||
parent_link_field = ("parent_" + scrub(doc.doctype))
|
||||
if doc.meta.get_field(parent_link_field) and not doc.get(parent_link_field):
|
||||
doc.flags.ignore_mandatory = True
|
||||
|
||||
try:
|
||||
doc.insert()
|
||||
except NameError, e:
|
||||
if e.args[0] == r.get("doctype") and e.args[2] and e.args[2].args[0] == 1062:
|
||||
# duplicate entry
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
doc.insert()
|
||||
|
@ -440,8 +440,7 @@ def create_territories():
|
||||
|
||||
def login_as_first_user(args):
|
||||
if args.get("email") and hasattr(frappe.local, "login_manager"):
|
||||
frappe.local.login_manager.user = args.get("email")
|
||||
frappe.local.login_manager.post_login()
|
||||
frappe.local.login_manager.login_as(args.get("email"))
|
||||
|
||||
@frappe.whitelist()
|
||||
def load_messages(language):
|
||||
|
Loading…
x
Reference in New Issue
Block a user