Skip to content

Commit

Permalink
Hotfix for "Service History"
Browse files Browse the repository at this point in the history
Checkers also run against inactive teams and we only have active teams
here.
  • Loading branch information
F30 committed Jun 26, 2019
1 parent 12f5697 commit 6d9c823
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ctf_gameserver/web/scoring/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,13 @@ def append_result(next_team_id):
# Status checks are ordered by team ID, finalize result for a team when it changes
if current_team['id'] != check.team.user.id:
append_result(check.team.user.id)
current_team = {'id': check.team.user.id, 'name': teams[check.team.user.id].user.username,
# TODO: status check for inactive teams causes this key error
# (active_objects returns only active objects)
try:
team_name = teams[check.team.user.id].user.username
except KeyError:
team_name = '<unknown>'
current_team = {'id': check.team.user.id, 'name': team_name,
'checks': []}
current_tick = from_tick

Expand Down

0 comments on commit 6d9c823

Please sign in to comment.