Skip to content

Commit

Permalink
hotfix: get_ranking_score() fallback (#1077)
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-smith authored Nov 22, 2024
2 parents fe84a80 + 7fbc4f7 commit 4b880c6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1659,9 +1659,7 @@ def get_ranking_score(self):
residual = risk_scenario.residual_level
if current >= 0 and residual >= 0:
value += (1 + current - residual) * (current + 1)
return (
abs(round(value / self.MAP_EFFORT[self.effort], 4)) if self.effort else None
)
return abs(round(value / self.MAP_EFFORT[self.effort], 4)) if self.effort else 0

@property
def get_html_url(self):
Expand Down

0 comments on commit 4b880c6

Please sign in to comment.