[setup-wizard] don't catch duplicate

This commit is contained in:
Rushabh Mehta 2015-04-02 18:55:36 +05:30
parent 750ceedbc1
commit 05e39992d0
2 changed files with 2 additions and 11 deletions

View File

@ -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()

View File

@ -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):