Fix game diff

clubs
Laurent 2 years ago
parent 4385232017
commit 6a8846d34f
  1. 4
      tournaments/models/group_stage.py

@ -76,8 +76,8 @@ class GroupStage(models.Model):
if ts1.team_registration in gs_teams and ts2.team_registration in gs_teams: if ts1.team_registration in gs_teams and ts2.team_registration in gs_teams:
team1 = gs_teams[ts1.team_registration] team1 = gs_teams[ts1.team_registration]
team2 = gs_teams[ts2.team_registration] team2 = gs_teams[ts2.team_registration]
team1.diff = total1 - total2 team1.diff += total1 - total2
team2.diff = total2 - total1 team2.diff += total2 - total1
if len(self.match_set.all()) == 0: if len(self.match_set.all()) == 0:
teams = sorted(gs_teams.values(), key=lambda team: team.position) teams = sorted(gs_teams.values(), key=lambda team: team.position)

Loading…
Cancel
Save