perf: cast dynamic links while filtering (#32294)

lessen impact of https://github.com/frappe/frappe/issues/32287
This commit is contained in:
Ankush Menat 2025-04-25 11:13:01 +05:30 committed by GitHub
parent 266ec9f76e
commit dcb476c990
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -881,7 +881,7 @@ class DatabaseQuery:
# because "like" uses backslash (\) for escaping
value = value.replace("\\", "\\\\").replace("%", "%%")
elif f.operator == "=" and df and df.fieldtype in ["Link", "Data"]: # TODO: Refactor if possible
elif f.operator == "=" and df and df.fieldtype in ("Link", "Data", "Dynamic Link"):
value = cstr(f.value) or "''"
fallback = "''"