From 23f1fc62353293618675622fcfb34135f5fa142c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 22 Jun 2026 07:53:28 +0530 Subject: [PATCH] refactor(subcontracting): use f-string for fg reference search filter `get_fg_reference_names` built its LIKE filter with old-style `"%%%s%%" % txt`. Use an f-string (`f"%{txt}%"`) for readability; the value is still passed as a parameterised filter, so behaviour is unchanged. --- erpnext/controllers/subcontracting_inward_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/subcontracting_inward_controller.py b/erpnext/controllers/subcontracting_inward_controller.py index 32eb7e46fd6..e6a9e06aed5 100644 --- a/erpnext/controllers/subcontracting_inward_controller.py +++ b/erpnext/controllers/subcontracting_inward_controller.py @@ -1163,7 +1163,7 @@ def get_fg_reference_names( "Subcontracting Inward Order Item", limit_start=start, limit_page_length=page_len, - filters={"parent": filters.get("parent"), "item_code": ("like", "%%%s%%" % txt), "docstatus": 1}, + filters={"parent": filters.get("parent"), "item_code": ("like", f"%{txt}%"), "docstatus": 1}, fields=["name", "item_code", "delivery_warehouse"], as_list=True, order_by="idx",