Skip to content

Commit

Permalink
fix: sqlalchemy boolean operator.
Browse files Browse the repository at this point in the history
fixes #140
  • Loading branch information
nicfit committed Nov 9, 2019
1 parent 146d1b9 commit 9076b3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unsonic/views/rest/getrandomsongs.py
Expand Up @@ -45,8 +45,8 @@ def handleReq(self, session):
order_by(dbfunc.random()).limit(self.params["size"]))
elif fy and ty:
rows = (self.query(session).
join(Album).filter(Album.release_date >= fy and
Album.release_date <= ty).
join(Album).filter(and_(Album.release_date >= fy,
Album.release_date <= ty)).
order_by(dbfunc.random()).limit(self.params["size"]))
elif fy:
rows = (self.query(session).
Expand Down

0 comments on commit 9076b3a

Please sign in to comment.