diff --git a/CTFd/views.py b/CTFd/views.py index 402ac0b4..7ee18b66 100644 --- a/CTFd/views.py +++ b/CTFd/views.py @@ -136,6 +136,8 @@ def team(teamid): if get_config('view_scoreboard_if_authed') and not authed(): return redirect(url_for('auth.login', next=request.path)) user = Teams.query.filter_by(id=teamid).first() + if not user: + abort(404) solves = Solves.query.filter_by(teamid=teamid) awards = Awards.query.filter_by(teamid=teamid).all() score = user.score()