Merge pull request #591 from inukiwi/master

Do not ignore empty lists in database selects
This commit is contained in:
Donkie
2025-02-24 21:00:30 +01:00
committed by GitHub

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