refactor(customer): replace SQL with ORM in on_trash (#55211)

This commit is contained in:
Loic Oberle
2026-05-23 08:09:28 +02:00
committed by GitHub
parent f9d430c4aa
commit 3cd9943cc0

View File

@@ -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: