mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-12 22:21:50 +00:00
refactor: parse native JSON request args in stock/doctype/batch/batch.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:
@@ -404,8 +404,7 @@ def make_batch(kwargs):
|
||||
def get_pos_reserved_batch_qty(filters: dict | str):
|
||||
import json
|
||||
|
||||
if isinstance(filters, str):
|
||||
filters = json.loads(filters)
|
||||
filters = frappe.parse_json(filters)
|
||||
|
||||
p = frappe.qb.DocType("POS Invoice").as_("p")
|
||||
item = frappe.qb.DocType("POS Invoice Item").as_("item")
|
||||
|
||||
Reference in New Issue
Block a user