[hotfix] fixed the invalid variable name lead.name (#10648)
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index cf8b793..6c6eb3a 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -91,7 +91,7 @@
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]