fix: updating lead status while customer creation (#26607)
* fix: updating lead status while customer creation
* fix: changes requested
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index 818888c..9785f6c 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -134,9 +134,7 @@
'''If Customer created from Lead, update lead status to "Converted"
update Customer link in Quotation, Opportunity'''
if self.lead_name:
- lead = frappe.get_doc('Lead', self.lead_name)
- lead.status = 'Converted'
- lead.save()
+ frappe.db.set_value("Lead", self.lead_name, "status", "Converted")
def create_lead_address_contact(self):
if self.lead_name: