refactor: parse native JSON request args in stock/doctype/serial_no/serial_no.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 2c7cea2879
commit ddd57ca12e

View File

@@ -222,8 +222,7 @@ def auto_fetch_serial_number(
@frappe.whitelist()
def get_pos_reserved_serial_nos(filters: str | dict):
if isinstance(filters, str):
filters = json.loads(filters)
filters = frappe.parse_json(filters)
POSInvoice = frappe.qb.DocType("POS Invoice")
POSInvoiceItem = frappe.qb.DocType("POS Invoice Item")