Fix float precision in contest ranking

This commit is contained in:
cuom1999 2021-02-11 13:58:41 -06:00
parent 6f7e5f5173
commit 50f506cd93

View file

@ -593,7 +593,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, user__is_unlisted=False)
.prefetch_related('user__organizations')
.order_by('is_disqualified', '-score', 'cumtime'))
.extra(select={'round_score': 'round(score, 6)'})
.order_by('is_disqualified', '-round_score', 'cumtime'))
def get_contest_ranking_list(request, contest, participation=None, ranking_list=contest_ranking_list,