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