mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-26 13:25:20 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user