Skip to content

Commit

Permalink
Sort contest users with 0 points by submission count
Browse files Browse the repository at this point in the history
  • Loading branch information
int-y1 authored and kiritofeng committed Jan 6, 2024
1 parent 18e49e0 commit c39f176
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion judge/views/contests.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,8 @@ def base_contest_ranking_list(contest, problems, queryset):
def contest_ranking_list(contest, problems):
return base_contest_ranking_list(contest, problems, contest.users.filter(virtual=0)
.prefetch_related('user__organizations')
.order_by('is_disqualified', '-score', 'cumtime', 'tiebreaker'))
.annotate(submission_cnt=Count('submission'))
.order_by('is_disqualified', '-score', 'cumtime', 'tiebreaker', '-submission_cnt'))


def get_contest_ranking_list(request, contest, participation=None, ranking_list=contest_ranking_list,
Expand Down

0 comments on commit c39f176

Please sign in to comment.