Skip to content

Commit

Permalink
add and_ operator
Browse files Browse the repository at this point in the history
Co-authored-by: Élie Bouttier <[email protected]>
  • Loading branch information
jacquesfize and bouttier authored Dec 19, 2023
1 parent 9b3934a commit 619b3ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils_flask_sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def filter_by_params(cls,**kwargs):
filters = []
if "id_station" in kwargs:
filters.append(Station.id_station == kwargs["id_station"])
return filters
return sa.and_(*filters)
# If you wish the method to return a query
@qfilter(query=True)
def filter_by_paramsQ(cls,**kwargs):
Expand Down

0 comments on commit 619b3ca

Please sign in to comment.