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:
Mihir Kandoi
2026-06-24 20:37:34 +05:30
parent 8dd05ca056
commit 78f38970c1

View File

@@ -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 = {}