mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-13 14:41:53 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user