Do not ignore empty lists in database selects

This commit is contained in:
inukiwi
2025-01-15 23:14:09 +01:00
parent 276fd1e733
commit 1f3c1c0ad5

View File

@@ -126,6 +126,6 @@ def add_where_clause_int_in(
value: Optional[Sequence[T]], value: Optional[Sequence[T]],
) -> Select: ) -> Select:
"""Add a where clause to a select statement for a field.""" """Add a where clause to a select statement for a field."""
if value is not None and len(value) > 0: if value is not None:
stmt = stmt.where(field.in_(value)) stmt = stmt.where(field.in_(value))
return stmt return stmt