Skip to content

Commit c31095b

Browse files
committed
fix type error in _prepare_conditions()
1 parent 878fb8b commit c31095b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

simple_query_builder/querybuilder.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,10 @@ def _prepare_conditions(self, where: Union[str, list]) -> dict:
284284
field = self._prepare_field(cond[0])
285285
value = cond[1]
286286

287-
if value.lower() == "is null":
287+
if isinstance(value, str) and value.lower() == "is null":
288288
operator = "IS NULL"
289289
sql += f"({field} {operator})"
290-
elif value.lower() == "is not null":
290+
elif isinstance(value, str) and value.lower() == "is not null":
291291
operator = "IS NOT NULL"
292292
sql += f"({field} {operator})"
293293
elif isinstance(value, list) or isinstance(value, tuple):

0 commit comments

Comments
 (0)