Fixed NameError handling
This commit is contained in:
parent
b054eb7a4f
commit
f50a65294f
File diff suppressed because it is too large
Load Diff
@ -66,7 +66,7 @@ class Customer(TransactionBase):
|
||||
c.is_primary_contact = 1
|
||||
try:
|
||||
c.save()
|
||||
except NameError:
|
||||
except frappe.NameError:
|
||||
pass
|
||||
|
||||
def on_update(self):
|
||||
|
@ -151,7 +151,7 @@ def _make_customer(source_name, ignore_permissions=False):
|
||||
try:
|
||||
customer.insert()
|
||||
return customer
|
||||
except NameError:
|
||||
except frappe.NameError:
|
||||
if frappe.defaults.get_global_default('cust_master_name') == "Customer Name":
|
||||
customer.run_method("autoname")
|
||||
customer.name += "-" + lead_name
|
||||
|
@ -15,7 +15,7 @@ def install(company):
|
||||
for d in docs:
|
||||
try:
|
||||
frappe.get_doc(d).insert()
|
||||
except NameError:
|
||||
except frappe.NameError:
|
||||
pass
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user