Skip to content

Commit

Permalink
Don't show cumulative points whenever not credited
Browse files Browse the repository at this point in the history
This commit changes the condition to show a "-" in the private URL
debate table whenever the team did not get a number of points, rather
than for break rounds. This makes the table more general and prevents
a crash when trying to multiply by the round weight.

It is preferable than defaulting to adding 0 as it indicates which
debate has no points, and even if in the middle of a tournament,
the number of points they have would be on the previous line.

Fixes BACKEND-BVY
  • Loading branch information
tienne-B committed Dec 9, 2023
1 parent 1019814 commit 2005b12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tabbycat/participants/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def add_cumulative_team_points_column(self, teamscores):
cumul = 0
data = []
for teamscore in teamscores:
if teamscore.debate_team.debate.round.is_break_round:
if teamscore.points is None:
data.append("—")
else:
cumul += teamscore.points * teamscore.debate_team.debate.round.weight
Expand Down

0 comments on commit 2005b12

Please sign in to comment.