refactor: parse native JSON request args in manufacturing/doctype/production_plan/services/material_request.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:33 +05:30
parent 6b1e18f79e
commit 3946bf5366

View File

@@ -159,8 +159,7 @@ def get_items_for_material_requests(
def _normalize_mr_doc(doc):
if isinstance(doc, str):
doc = frappe._dict(json.loads(doc))
doc = frappe._dict(frappe.parse_json(doc))
return doc