From 55b24345a01a0e040d98b3004afa4b980b2ba06a Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 1 Sep 2021 15:24:49 +0530 Subject: [PATCH] fix: remove unused format from query doctype is not used in query and parent alone is enough to identify packed items. --- erpnext/controllers/sales_and_purchase_return.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 01486fcd65..f673a9b6e5 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -63,7 +63,7 @@ def validate_returned_items(doc): if doc.doctype in ("Delivery Note", "Sales Invoice"): for d in frappe.db.sql("""select item_code, qty, serial_no, batch_no from `tabPacked Item` - where parent = %s""".format(doc.doctype), doc.return_against, as_dict=1): + where parent = %s""", doc.return_against, as_dict=1): valid_items = get_ref_item_dict(valid_items, d) already_returned_items = get_already_returned_items(doc)