Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jdabtieu committed Feb 25, 2021
1 parent ad2c7e9 commit 10aaf1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def contest_problem(contest_id, problem_id):

# Check if user is disqualified
user = db.execute("SELECT * FROM contest_users WHERE user_id=?", session["user_id"])
if user[0]["points"] == -999999:
if len(user) > 0 and user[0]["points"] == -999999:
flash('You are disqualified from this contest', 'danger')
return render_template("contest/contest_problem.html", data=check[0])

Expand Down

0 comments on commit 10aaf1c

Please sign in to comment.