mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-26 20:38:35 +00:00
refactor: parse native JSON request args in accounts/doctype/unreconcile_payment/unreconcile_payment.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:
@@ -201,9 +201,9 @@ def get_linked_advances(company, docname):
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def create_unreconcile_doc_for_selection(selections: str | None = None):
|
||||
def create_unreconcile_doc_for_selection(selections: str | list | None = None):
|
||||
if selections:
|
||||
selections = json.loads(selections)
|
||||
selections = frappe.parse_json(selections)
|
||||
# assuming each row is a unique voucher
|
||||
for row in selections:
|
||||
unrecon = frappe.new_doc("Unreconcile Payment")
|
||||
|
||||
Reference in New Issue
Block a user