mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-22 02:40:02 +00:00
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:
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user