Fixing some mistakes

selenium-screenshot-testing
Kevin Chung 2016-05-07 16:52:24 -04:00
parent d2778c30ad
commit 03d8dda878
2 changed files with 4 additions and 5 deletions

View File

@ -553,20 +553,19 @@ def admin_graph(graph_type):
@admins_only
def admin_scoreboard():
score = db.func.sum(Challenges.value).label('score')
scores = db.session.query(Solves.teamid.label('teamid'), Teams.name.label('name'), score, Solves.date.label('date')) \
scores = db.session.query(Solves.teamid.label('teamid'), Teams.name.label('name'), Teams.banned.label('banned'), score, Solves.date.label('date')) \
.join(Teams) \
.join(Challenges) \
.filter(Teams.banned == None) \
.group_by(Solves.teamid)
awards = db.session.query(Teams.id.label('teamid'), Teams.name.label('name'),
awards = db.session.query(Teams.id.label('teamid'), Teams.name.label('name'), Teams.banned.label('banned'),
db.func.sum(Awards.value).label('score'), Awards.date.label('date')) \
.filter(Teams.id == Awards.teamid) \
.group_by(Teams.id)
results = union_all(scores, awards)
standings = db.session.query(results.columns.teamid, results.columns.name,
standings = db.session.query(results.columns.teamid, results.columns.name, results.columns.banned,
db.func.sum(results.columns.score).label('score')) \
.group_by(results.columns.teamid) \
.order_by(db.func.sum(results.columns.score).desc(), db.func.max(results.columns.date)) \

View File

@ -231,7 +231,7 @@ $('#send-user-email').click(function(e){
});
});
$('#delete-container').click(function(e){
$('#delete-user').click(function(e){
e.preventDefault();
var id = $('#confirm input[name="id"]').val()
var user_data = $('#confirm form').serializeArray()