From 3946bf53664e7e3cae88d4e05326d0318622b897 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 24 Jun 2026 20:37:33 +0530 Subject: [PATCH] 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. --- .../doctype/production_plan/services/material_request.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/services/material_request.py b/erpnext/manufacturing/doctype/production_plan/services/material_request.py index a17d434136a..c4f12d8f1b7 100644 --- a/erpnext/manufacturing/doctype/production_plan/services/material_request.py +++ b/erpnext/manufacturing/doctype/production_plan/services/material_request.py @@ -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