Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/apps/api/views/competitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ def get_leaderboard(self, request, pk):
# - child submissions (submissions who has a parent i.e. parent field is not null)
# - Failed submissions
# - Cancelled submissions
num_entries = 1 # TMP, remove counting
# num_entries = Submission.objects.filter(
# Q(owner__username=submission['owner']) |
# Q(parent__owner__username=submission['owner']),
Expand Down Expand Up @@ -737,7 +738,7 @@ def get_leaderboard(self, request, pk):
'fact_sheet_answers': submission['fact_sheet_answers'],
'slug_url': submission['slug_url'],
'organization': submission['organization'],
# 'num_entries': num_entries,
'num_entries': num_entries,
'created_when': submission['created_when']
})
for score in submission['scores']:
Expand Down
2 changes: 2 additions & 0 deletions src/static/riot/competitions/detail/leaderboards.tag
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<tr>
<th class="center aligned">#</th>
<th>Participant</th>
<th>Entries</th>
<th>Date</th>
<th>ID</th>
<th each="{ column in filtered_columns }" colspan="1">{column.title}</th>
Expand Down Expand Up @@ -82,6 +83,7 @@
</td>
<td if="{submission.organization === null}"><a href="{submission.slug_url}">{ submission.owner }</a></td>
<td if="{submission.organization !== null}"><a href="{submission.organization.url}">{ submission.organization.name }</a></td>
<td>{submission.num_entries}</td>
<td>{ pretty_date(submission.created_when) }</td>
<td>{submission.id}</td>
<td each="{ column in filtered_columns }">
Expand Down
2 changes: 1 addition & 1 deletion src/tests/functional/test_submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _run_submission_and_add_to_leaderboard(self, competition_zip_path, submissio

# The leaderboard table lists our submission
prediction_score = Submission.objects.get(pk=submission_id).scores.first().score
assert Decimal(self.find('leaderboards table tbody tr:nth-of-type(1) td:nth-of-type(5)').text) == round(Decimal(prediction_score), precision)
assert Decimal(self.find('leaderboards table tbody tr:nth-of-type(1) td:nth-of-type(6)').text) == round(Decimal(prediction_score), precision)

def test_v15_iris_result_submission_end_to_end(self):
self._run_submission_and_add_to_leaderboard('competition_15_iris.zip', 'submission_15_iris_result.zip', '======= Set 1 (Iris_test)', has_solutions=False, precision=4)
Expand Down