mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-17 00:18:39 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user