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
1 change: 0 additions & 1 deletion src/apps/api/views/competitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def get_queryset(self):
# On GETs lets optimize the query to reduce DB calls
if self.request.method == 'GET':

logger.warning("\n\nGET\n\n")
qs = qs.select_related('created_by')
if self.action != 'list':
qs = qs.select_related('created_by')
Expand Down
13 changes: 12 additions & 1 deletion src/static/riot/competitions/detail/submission_manager.tag
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
<th if="{ opts.admin }">Owner</th>
<th if="{ opts.admin }">Phase</th>
<th>Date</th>
<th class="right aligned">Status</th>
<th>Status</th>
<th>Score</th>
<th class="center aligned {admin-action-column: opts.admin, action-column: !opts.admin}">Actions</th>
</tr>
</thead>
Expand Down Expand Up @@ -94,6 +95,7 @@
<i if="{submission.status === 'Failed'}" class="failed question circle icon"></i>
</sup>
</td>
<td>{get_score(submission)}</td>
<td class="center aligned">
<virtual if="{ opts.admin }">
<span data-tooltip="Rerun Submission"
Expand Down Expand Up @@ -382,6 +384,15 @@
}
}

self.get_score = function (submission) {
try{
return parseFloat(submission.scores[0].score).toFixed(2)

} catch {
return ""
}
}

self.toggle_submission_is_public = function (submission) {
event.stopPropagation()
let message = submission.is_public
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 @@ -68,7 +68,7 @@ def _run_submission_and_add_to_leaderboard(self, competition_zip_path, submissio
submission_id = int(self.find('submission-manager#user-submission-table table tbody tr:nth-of-type(1) td:nth-of-type(1)').text)

# Add the submission to the leaderboard and go to results tab
self.find('submission-manager#user-submission-table table tbody tr:nth-of-type(1) td:nth-of-type(5) span[data-tooltip="Add to Leaderboard"]').click()
self.find('submission-manager#user-submission-table table tbody tr:nth-of-type(1) td:nth-of-type(6) span[data-tooltip="Add to Leaderboard"]').click()
self.find('.item[data-tab="results-tab"]').click()

# The leaderboard table lists our submission
Expand Down