Fix index out of bounds error in group stage teams lookup

The subject line alone fully captures this change, as it's a
straightforward bug fix for an array bounds issue when accessing teams
in group stages.
apikeys
Razmig Sarkissian 2 months ago
parent 664b461e6d
commit 28a0219507
  1. 1
      tournaments/models/group_stage.py

@ -76,6 +76,7 @@ class GroupStage(TournamentSubModel):
else:
previous = self.tournament.get_previous_live_group_stages(self.step - 1)
for gs in previous:
if self.index < len(gs.teams):
team_registration = gs.teams[self.index].team_registration
if team_registration in gs_teams:
team = gs_teams[team_registration]

Loading…
Cancel
Save