Skip to content

Commit

Permalink
feat: add ability to pass tuples to where filter
Browse files Browse the repository at this point in the history
  • Loading branch information
e-kondr01 committed Mar 15, 2024
1 parent 2df77dc commit 5d7b2f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion fastapi_sqlalchemy_toolkit/model_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,10 @@ def assemble_stmt(
stmt = stmt.options(option)

if where is not None:
stmt = stmt.where(where)
if isinstance(where, tuple):
stmt = stmt.where(*where)
else:
stmt = stmt.where(where)

return stmt

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "fastapi_sqlalchemy_toolkit"
version = "0.7.3.1"
version = "0.7.4"
authors = [
{ name="Egor Kondrashov", email="[email protected]" },
]
Expand Down

0 comments on commit 5d7b2f1

Please sign in to comment.