From 2c7cea28796f2fc10de3d3ee4c736c0726fe61ae Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 24 Jun 2026 20:37:35 +0530 Subject: [PATCH] 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. --- .../doctype/repost_item_valuation/repost_item_valuation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index 311396d2bd3..befb52c444a 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -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":