From 3cd9943cc0681ac7da11d68778292c2ef731dc0c Mon Sep 17 00:00:00 2001 From: Loic Oberle Date: Sat, 23 May 2026 08:09:28 +0200 Subject: [PATCH] refactor(customer): replace SQL with ORM in on_trash (#55211) --- erpnext/selling/doctype/customer/customer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: