From bf30b58d0272f4b276dc551344d5be464a33e524 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 24 Jun 2026 20:37:34 +0530 Subject: [PATCH] refactor: parse native JSON request args in selling/doctype/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. --- erpnext/selling/doctype/quotation/mapper.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/doctype/quotation/mapper.py b/erpnext/selling/doctype/quotation/mapper.py index 166bd5278ab..2182c969d4e 100644 --- a/erpnext/selling/doctype/quotation/mapper.py +++ b/erpnext/selling/doctype/quotation/mapper.py @@ -31,8 +31,7 @@ def make_sales_order( def _make_sales_order(source_name, target_doc=None, ignore_permissions=False, args=None): if args is None: args = {} - if isinstance(args, str): - args = json.loads(args) + args = frappe.parse_json(args) customer = _make_customer(source_name, ignore_permissions) ordered_items = get_ordered_items(source_name) @@ -151,8 +150,7 @@ def make_sales_invoice( def _make_sales_invoice(source_name, target_doc=None, ignore_permissions=False, args=None): if args is None: args = {} - if isinstance(args, str): - args = json.loads(args) + args = frappe.parse_json(args) customer = _make_customer(source_name, ignore_permissions)