fixed python3 error

This commit is contained in:
Achilles Rasquinha 2018-01-30 13:47:18 +05:30
parent c463c0684d
commit 2862e25f3e

View File

@ -128,7 +128,7 @@ def insert_record(records):
doc.update(r)
try:
doc.insert(ignore_permissions=True)
except frappe.DuplicateEntryError, e:
except frappe.DuplicateEntryError as e:
# pass DuplicateEntryError and continue
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