Do not ignore empty lists in database selects
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user