mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-31 07:28:04 +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()
|
@frappe.whitelist()
|
||||||
def bulk_restart_reposting(names: str):
|
def bulk_restart_reposting(names: str | list):
|
||||||
names = json.loads(names)
|
names = frappe.parse_json(names)
|
||||||
for name in names:
|
for name in names:
|
||||||
doc = frappe.get_doc("Repost Item Valuation", name)
|
doc = frappe.get_doc("Repost Item Valuation", name)
|
||||||
if doc.status != "Failed":
|
if doc.status != "Failed":
|
||||||
|
|||||||
Reference in New Issue
Block a user