mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
Merge pull request #12705 from achillesrasquinha/12704
Fix for python 3 compatibility
This commit is contained in:
@@ -128,7 +128,7 @@ def insert_record(records):
|
|||||||
doc.update(r)
|
doc.update(r)
|
||||||
try:
|
try:
|
||||||
doc.insert(ignore_permissions=True)
|
doc.insert(ignore_permissions=True)
|
||||||
except frappe.DuplicateEntryError, e:
|
except frappe.DuplicateEntryError as e:
|
||||||
# pass DuplicateEntryError and continue
|
# pass DuplicateEntryError and continue
|
||||||
if e.args and e.args[0]==doc.doctype and e.args[1]==doc.name:
|
if e.args and e.args[0]==doc.doctype and e.args[1]==doc.name:
|
||||||
# make sure DuplicateEntryError is for the exact same doc and not a related doc
|
# make sure DuplicateEntryError is for the exact same doc and not a related doc
|
||||||
|
|||||||
Reference in New Issue
Block a user