Skip to content

Commit

Permalink
Fix colors in ranking.
Browse files Browse the repository at this point in the history
  • Loading branch information
geoff128 committed Dec 10, 2023
1 parent a8d559d commit 1d70a06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions oioioi/base/templatetags/simple_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from django.utils.safestring import mark_safe

from oioioi.contests.scores import IntegerScore
from oioioi.mp.score import FloatScore
from oioioi.pa.score import PAScore

register = template.Library()
Expand Down Expand Up @@ -274,6 +275,8 @@ def result_color_class(raw_score):
score_max_value = 100
elif isinstance(raw_score, PAScore):
score_max_value = 10
elif isinstance(raw_score, FloatScore):
score_max_value = 100
else:
# There should be a method to get maximum points for
# contest, for now, support just above cases.
Expand Down

0 comments on commit 1d70a06

Please sign in to comment.