fix: cstr value in func_is to avoid AttributeError

This commit is contained in:
KerollesFathy 2026-03-11 14:15:14 +00:00
parent c5bf0d3f59
commit 78ae8d9b52

View file

@ -9,6 +9,7 @@ from frappe.database.utils import NestedSetHierarchy
from frappe.model.db_query import get_timespan_date_range
from frappe.query_builder import Field
from frappe.query_builder.functions import Coalesce
from frappe.utils import cstr
def like(key: Field, value: str) -> frappe.qb:
@ -107,7 +108,7 @@ def func_between(key: Field, value: list | tuple) -> frappe.qb:
def func_is(key, value):
"Wrapper for IS"
match value.lower():
match cstr(value).lower():
case "set":
return key != ""
case "not set":