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:
Mihir Kandoi
2026-06-24 20:37:31 +05:30
parent 3b25c2b7c2
commit 2985a8b263

View File

@@ -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."))