Skip to content

Commit

Permalink
[scorecards] use max not non negative score for percentage penalty
Browse files Browse the repository at this point in the history
The percentage section penalty on the council page was using the non
negative score to calculate the percentage penaltry rather than the max
score for the sections.

Fixes #597
  • Loading branch information
struan committed Oct 23, 2023
1 parent 8f7ed35 commit 0d2d34c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scoring/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def get_context_data(self, **kwargs):
if data.get("has_negative_points", False):
if data["non_negative_max"] != 0:
data["negative_percent"] = (
data["negative_points"] / data["non_negative_max"]
data["negative_points"] / data["max_score"]
) * -100
else:
data["only_negative"] = True
Expand Down

0 comments on commit 0d2d34c

Please sign in to comment.