mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 14:34:21 +01:00
make the ban and unban switcher work
This commit is contained in:
@@ -350,7 +350,7 @@ def init_admin(app):
|
|||||||
def admin_scoreboard():
|
def admin_scoreboard():
|
||||||
score = db.func.sum(Challenges.value).label('score')
|
score = db.func.sum(Challenges.value).label('score')
|
||||||
quickest = db.func.max(Solves.date).label('quickest')
|
quickest = db.func.max(Solves.date).label('quickest')
|
||||||
teams = db.session.query(Solves.teamid, Teams.name, score).join(Teams).join(Challenges).filter(Teams.banned == None).group_by(Solves.teamid).order_by(score.desc(), quickest)
|
teams = db.session.query(Solves.teamid, Teams.name, Teams.banned, score).join(Teams).join(Challenges).group_by(Solves.teamid).order_by(score.desc(), quickest)
|
||||||
db.session.close()
|
db.session.close()
|
||||||
return render_template('admin/scoreboard.html', teams=teams)
|
return render_template('admin/scoreboard.html', teams=teams)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user