fix: ignore duplicate fixtures

This commit is contained in:
Ankush Menat 2022-04-21 20:43:07 +05:30
parent e1c1687661
commit cdac2b8c63

View File

@ -1219,7 +1219,7 @@ def make_fixtures(company=None):
try:
doc = frappe.get_doc(d)
doc.flags.ignore_permissions = True
doc.insert()
doc.insert(ignore_if_duplicate=True)
except frappe.NameError:
frappe.clear_messages()
except frappe.DuplicateEntryError: