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.
This commit is contained in:
Mihir Kandoi
2026-06-24 20:37:32 +05:30
parent d8ff9b7dbb
commit b5687d659f

View File

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