mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-17 16:38:41 +00:00
refactor: parse native JSON request args in selling/page/point_of_sale/point_of_sale.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:
@@ -347,8 +347,8 @@ def check_opening_entry(user: str):
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def create_opening_voucher(pos_profile: str, company: str, balance_details: str):
|
||||
balance_details = json.loads(balance_details)
|
||||
def create_opening_voucher(pos_profile: str, company: str, balance_details: str | list):
|
||||
balance_details = frappe.parse_json(balance_details)
|
||||
|
||||
new_pos_opening = frappe.get_doc(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user