mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-11 05:31:48 +00:00
refactor: parse native JSON request args in stock/doctype/repost_item_valuation/repost_item_valuation.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:
@@ -364,8 +364,8 @@ class RepostItemValuation(Document):
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def bulk_restart_reposting(names: str):
|
||||
names = json.loads(names)
|
||||
def bulk_restart_reposting(names: str | list):
|
||||
names = frappe.parse_json(names)
|
||||
for name in names:
|
||||
doc = frappe.get_doc("Repost Item Valuation", name)
|
||||
if doc.status != "Failed":
|
||||
|
||||
Reference in New Issue
Block a user