Commit 36d6100f authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers 🐦

ensure that non-number values are displayed in the scoreboard correctly

parent 519957a4
Pipeline #2403 failed with stages
in 5 minutes and 38 seconds
......@@ -160,6 +160,10 @@ class Submission(models.Model):
else:
return self.ranking
@property
def is_valid(self):
return self.current and self.current.status in ('BS', 'VS')
@property
def versions(self):
if self.submission_type == "U":
......
......@@ -21,7 +21,11 @@
<tr {% if not submission.current %} class="warning" {% endif %}>
<th><a href="{{submission.get_absolute_url}}">{{submission}}</a>{% if submission.sample %} <span class="badge badge-secondary">sample</span>{% endif %}</th>
<td>{% user_display submission.owner %}</td>
{% if submission.is_valid %}
<td>{{ submission.pretty_score|floatformat:3 }}</td>
{% else %}
<td>{{ submission.pretty_score }}</td>
{% endif %}
</tr>
{% empty %}
<tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment