diff --git a/erpnext/stock/report/stock_qty_vs_batch_qty/stock_qty_vs_batch_qty.py b/erpnext/stock/report/stock_qty_vs_batch_qty/stock_qty_vs_batch_qty.py index 83ff83e869d..46c0c5da4ea 100644 --- a/erpnext/stock/report/stock_qty_vs_batch_qty/stock_qty_vs_batch_qty.py +++ b/erpnext/stock/report/stock_qty_vs_batch_qty/stock_qty_vs_batch_qty.py @@ -100,12 +100,12 @@ def get_data(filters=None): @frappe.whitelist() -def update_batch_qty(selected_batches: str | None = None): +def update_batch_qty(selected_batches: str | list | None = None): frappe.has_permission("Batch", "write", throw=True, ignore_share_permissions=True) if not selected_batches: return - selected_batches = json.loads(selected_batches) + selected_batches = frappe.parse_json(selected_batches) for row in selected_batches: batch_name = row.get("batch")