fix count in get_standings doesn't work (#132)

This commit is contained in:
wangxiyu191
2016-08-16 09:31:44 +08:00
committed by Kevin Chung
parent 732278587a
commit 59a8becd45

View File

@@ -23,7 +23,7 @@ def get_standings(admin=False, count=None):
.join(sumscores, Teams.id == sumscores.columns.teamid) \
.filter(Teams.banned == False) \
.order_by(sumscores.columns.score.desc(), sumscores.columns.date)
if count is not None:
if count is None:
standings = standings_query.all()
else:
standings = standings_query.limit(count).all()