refactor: parse native JSON request args in stock/doctype/purchase_receipt/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:
Mihir Kandoi
2026-06-24 20:37:35 +05:30
parent 487aff80e0
commit a11eb741e5

View File

@@ -60,8 +60,7 @@ def make_purchase_invoice(
):
if args is None:
args = {}
if isinstance(args, str):
args = json.loads(args)
args = frappe.parse_json(args)
from erpnext.accounts.party import get_payment_terms_template