commit | 49d51b8ce72f7bcdb8931a3c23fde76e43c7a7b9 | [log] [tgz] |
---|---|---|
author | Shivam Mishra <scm.mymail@gmail.com> | Thu Jun 11 14:24:07 2020 +0530 |
committer | Shivam Mishra <scm.mymail@gmail.com> | Thu Jun 11 14:24:07 2020 +0530 |
tree | 6af2f81720e6007574379609458fe3d26589e888 | |
parent | 84fcc55a36fef6caa1ca45056bdf7d0d8711a0de [diff] |
feat: check duplicate contact explicitly
diff --git a/erpnext/non_profit/doctype/member/member.py b/erpnext/non_profit/doctype/member/member.py index 571f87a..aaa56ba 100644 --- a/erpnext/non_profit/doctype/member/member.py +++ b/erpnext/non_profit/doctype/member/member.py
@@ -92,6 +92,10 @@ }) contact.insert() + + except frappe.DuplicateEntryError: + return customer.name + except Exception as e: frappe.log_error(frappe.get_traceback(), _("Contact Creation Failed")) pass