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:
Mihir Kandoi
2026-06-24 20:37:35 +05:30
parent 8ca2e99cf2
commit 2c7cea2879

View File

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