[hotfix] fixed the invalid variable name lead.name (#10648)

This commit is contained in:
Makarand Bauskar 2017-09-04 10:25:37 +05:30 committed by Nabin Hait
parent d6922b2de3
commit cf9e986f82

View File

@ -91,7 +91,7 @@ class Customer(TransactionBase):
lead = frappe.db.get_value("Lead", self.lead_name, ["lead_name", "email_id", "phone", "mobile_no", "gender", "salutation"], as_dict=True)
if not lead.lead_name:
frappe.throw(_("Please mention the Lead Name in Lead {0}").format(lead.name))
frappe.throw(_("Please mention the Lead Name in Lead {0}").format(self.lead_name))
lead.lead_name = lead.lead_name.split(" ")
lead.first_name = lead.lead_name[0]