fix: cast POS query inputs to integers (backport #32975) (#32977)

fix: cast POS query inputs to integers  (#32975)

fix: cast POS query inputs to integers
(cherry picked from commit c013db6ea1)

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
mergify[bot]
2022-11-15 18:50:51 +05:30
committed by GitHub
parent d7340f54cf
commit 55e1592b70

View File

@@ -6,6 +6,7 @@ import json
from typing import Dict, Optional
import frappe
from frappe.utils import cint
from frappe.utils.nestedset import get_root_of
from erpnext.accounts.doctype.pos_invoice.pos_invoice import get_stock_availability
@@ -108,10 +109,10 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te
item.name asc
LIMIT
{page_length} offset {start}""".format(
start=start,
page_length=page_length,
lft=lft,
rgt=rgt,
start=cint(start),
page_length=cint(page_length),
lft=cint(lft),
rgt=cint(rgt),
condition=condition,
bin_join_selection=bin_join_selection,
bin_join_condition=bin_join_condition,