Merge pull request #56871 from mihir-kandoi/cast-error-postgres

fix: type cast error on postgres
This commit is contained in:
Mihir Kandoi
2026-07-04 14:24:20 +05:30
committed by GitHub
2 changed files with 7 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ from frappe.query_builder.functions import (
Substring,
Sum,
)
from frappe.utils import nowdate, today, unique
from frappe.utils import cint, nowdate, today, unique
from pypika import Order
import erpnext
@@ -808,7 +808,11 @@ def get_filtered_dimensions(
query_filters.append(["company", "=", filters.get("company")])
for field in searchfields:
or_filters.append([field, "LIKE", "%%%s%%" % txt])
df = meta.get_field(field)
if df and df.fieldtype != "Check":
or_filters.append([field, "LIKE", "%%%s%%" % txt])
else:
or_filters.append([field, "=", cint(txt)])
fields.append(field)
if dimension_filters:

View File

@@ -698,7 +698,7 @@ def get_barcode_data(items_list=None, item_code=None):
@frappe.whitelist()
def get_item_tax_info(
doc: Document | str | None,
doc: Document | dict | str | None,
tax_category: str,
item_codes: list | str,
item_rates: dict | str | None = None,