From 50f2654eb1f5681d0e6bdfba4194ed22a35514b8 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 24 Jun 2026 20:37:32 +0530 Subject: [PATCH] refactor: parse native JSON request args in crm/doctype/opportunity/opportunity.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/crm/doctype/opportunity/opportunity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 84ac1f4d300..5932a35cde4 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -391,7 +391,7 @@ def get_item_details(item_code: str): @frappe.whitelist() def set_multiple_status(names: str | list[str], status: str): - names = json.loads(names) + names = frappe.parse_json(names) for name in names: opp = frappe.get_doc("Opportunity", name) opp.status = status