mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-17 00:18:39 +00:00
refactor: parse native JSON request args in setup/doctype/department/department.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:
@@ -77,8 +77,7 @@ def get_children(
|
||||
is_root: bool = False,
|
||||
include_disabled: str | dict | None = None,
|
||||
):
|
||||
if isinstance(include_disabled, str):
|
||||
include_disabled = json.loads(include_disabled)
|
||||
include_disabled = frappe.parse_json(include_disabled)
|
||||
fields = ["name as value", "is_group as expandable"]
|
||||
filters = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user