mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-17 02:26:33 +00:00
refactor: parse native JSON request args in buying/doctype/supplier_quotation/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:
@@ -15,8 +15,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)
|
|
||||||
|
|
||||||
def set_missing_values(source, target):
|
def set_missing_values(source, target):
|
||||||
target.run_method("set_missing_values")
|
target.run_method("set_missing_values")
|
||||||
|
|||||||
Reference in New Issue
Block a user