From b5687d659f9ca91a9f9a75dd3e53020a6bac678f Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 24 Jun 2026 20:37:32 +0530 Subject: [PATCH] refactor: parse native JSON request args in controllers/queries.py Use frappe.parse_json instead of json.loads so the whitelisted endpoints accept native JSON types (list/dict/bool) in addition to JSON strings. --- erpnext/controllers/queries.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index f6e322eca6a..74b8b8af761 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -213,8 +213,7 @@ def item_query( """ doctype = "Item" - if isinstance(filters, str): - filters = json.loads(filters) + filters = frappe.parse_json(filters) if filters and isinstance(filters, dict): if filters.get("customer") or filters.get("supplier"):