mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-13 17:20:36 +00:00
refactor: parse native JSON request args in stock/doctype/material_request/mapper.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:
@@ -53,8 +53,7 @@ def make_purchase_order(
|
|||||||
):
|
):
|
||||||
if args is None:
|
if args is None:
|
||||||
args = {}
|
args = {}
|
||||||
if isinstance(args, str):
|
args = frappe.parse_json(args)
|
||||||
args = json.loads(args)
|
|
||||||
|
|
||||||
is_subcontracted = (
|
is_subcontracted = (
|
||||||
frappe.db.get_value("Material Request", source_name, "material_request_type") == "Subcontracting"
|
frappe.db.get_value("Material Request", source_name, "material_request_type") == "Subcontracting"
|
||||||
|
|||||||
Reference in New Issue
Block a user