404 for team pages

This commit is contained in:
CodeKevin
2016-04-30 16:11:32 -04:00
parent e4e989a0a5
commit c769f5865f

View File

@@ -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()