From 91c92b5e20eb905a6ed2aac859a4b203a8d2fe30 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 24 Jun 2026 20:37:31 +0530 Subject: [PATCH] refactor: parse native JSON request args in buying/doctype/request_for_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/buying/doctype/request_for_quotation/mapper.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/request_for_quotation/mapper.py b/erpnext/buying/doctype/request_for_quotation/mapper.py index b435bb607f5..77e9f02db85 100644 --- a/erpnext/buying/doctype/request_for_quotation/mapper.py +++ b/erpnext/buying/doctype/request_for_quotation/mapper.py @@ -57,8 +57,7 @@ def make_supplier_quotation_from_rfq( # This method is used to make supplier quotation from supplier's portal. @frappe.whitelist() def create_supplier_quotation(doc: str | Document | dict): - if isinstance(doc, str): - doc = json.loads(doc) + doc = frappe.parse_json(doc) if frappe.session.user not in frappe.get_all( "Portal User", {"parent": doc.get("supplier")}, pluck="user"