mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-22 02:40:02 +00:00
fix: ignore duplicates explicitly
This commit is contained in:
committed by
Ankush Menat
parent
856d3f63b5
commit
9c7df2eec5
@@ -155,7 +155,7 @@ def insert_record(records):
|
||||
doc = frappe.new_doc(r.get("doctype"))
|
||||
doc.update(r)
|
||||
try:
|
||||
doc.insert(ignore_permissions=True)
|
||||
doc.insert(ignore_permissions=True, ignore_if_duplicate=True)
|
||||
except frappe.DuplicateEntryError as e:
|
||||
# pass DuplicateEntryError and continue
|
||||
if e.args and e.args[0]==doc.doctype and e.args[1]==doc.name:
|
||||
|
||||
Reference in New Issue
Block a user