feat: check duplicate contact explicitly

This commit is contained in:
Shivam Mishra 2020-06-11 14:24:07 +05:30
parent 84fcc55a36
commit 49d51b8ce7

View File

@ -92,6 +92,10 @@ def create_customer(user_details):
}) })
contact.insert() contact.insert()
except frappe.DuplicateEntryError:
return customer.name
except Exception as e: except Exception as e:
frappe.log_error(frappe.get_traceback(), _("Contact Creation Failed")) frappe.log_error(frappe.get_traceback(), _("Contact Creation Failed"))
pass pass