refactor: parse native JSON request args in stock/doctype/stock_reconciliation/stock_reconciliation.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 9506a9d62a
commit 5aeb711f69

View File

@@ -1239,8 +1239,7 @@ def get_stock_balance_for(
item_dict = frappe.get_cached_value("Item", item_code, ["has_serial_no", "has_batch_no"], as_dict=1)
if isinstance(row, str):
row = json.loads(row)
row = frappe.parse_json(row)
if isinstance(row, dict):
row = frappe._dict(row)