diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index 9b5cd7c6557..4c2f6999e4c 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -405,7 +405,7 @@ class Customer(TransactionBase): delete_contact_and_address("Customer", self.name) if self.lead_name: - frappe.db.sql("update `tabLead` set status='Interested' where name=%s", self.lead_name) + frappe.db.set_value("Lead", self.lead_name, "status", "Interested") def before_rename(self, olddn, newdn, merge=False): if merge: