mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-25 04:53:01 +00:00
refactor: parse native JSON request args in accounts/doctype/pos_invoice/pos_invoice.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:
@@ -1036,8 +1036,7 @@ def make_sales_return(source_name: str, target_doc: Document | str | None = None
|
||||
def make_merge_log(invoices: str | list):
|
||||
import json
|
||||
|
||||
if isinstance(invoices, str):
|
||||
invoices = json.loads(invoices)
|
||||
invoices = frappe.parse_json(invoices)
|
||||
|
||||
if len(invoices) == 0:
|
||||
frappe.throw(_("At least one invoice has to be selected."))
|
||||
|
||||
Reference in New Issue
Block a user