Setup Wizard: catch duplicate entry error
diff --git a/erpnext/setup/page/setup_wizard/install_fixtures.py b/erpnext/setup/page/setup_wizard/install_fixtures.py
index e873e23..324fd1c 100644
--- a/erpnext/setup/page/setup_wizard/install_fixtures.py
+++ b/erpnext/setup/page/setup_wizard/install_fixtures.py
@@ -172,4 +172,12 @@
if doc.meta.get_field(parent_link_field) and not doc.get(parent_link_field):
doc.flags.ignore_mandatory = True
- doc.insert()
+ 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
+