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.
This commit is contained in:
Mihir Kandoi
2026-06-24 20:37:32 +05:30
parent dcc8d08521
commit 50f2654eb1

View File

@@ -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