mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-26 05:15:20 +00:00
refactor: parse native JSON request args in utilities/query.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:
@@ -62,8 +62,7 @@ def get_filter_conditions_qb(doctype, filters, ignore_permissions=None):
|
||||
if isinstance(filters, Criterion):
|
||||
return [filters]
|
||||
|
||||
if isinstance(filters, str):
|
||||
filters = json.loads(filters)
|
||||
filters = frappe.parse_json(filters)
|
||||
|
||||
if isinstance(filters, dict):
|
||||
# Mirror get_filters_cond's dict normalization: a string value prefixed with "!" means
|
||||
|
||||
Reference in New Issue
Block a user