[supplier] [fix] on_trash sql syntax fix
diff --git a/buying/doctype/supplier/supplier.py b/buying/doctype/supplier/supplier.py
index 6658db3..0137504 100644
--- a/buying/doctype/supplier/supplier.py
+++ b/buying/doctype/supplier/supplier.py
@@ -142,11 +142,11 @@
return ''
def delete_supplier_address(self):
- for rec in sql("select * from `tabAddress` where supplier='%s'" %(self.doc.name), as_dict=1):
+ for rec in sql("select * from `tabAddress` where supplier=%s", (self.doc.name,), as_dict=1):
sql("delete from `tabAddress` where name=%s",(rec['name']))
def delete_supplier_contact(self):
- for rec in sql("select * from `tabContact` where supplier='%s'" %(self.doc.name), as_dict=1):
+ for rec in sql("select * from `tabContact` where supplier=%s", (self.doc.name,), as_dict=1):
sql("delete from `tabContact` where name=%s",(rec['name']))
def delete_supplier_communication(self):