From 34770e05b9483f5acfd25a81ea87328a9a6e7eb6 Mon Sep 17 00:00:00 2001 From: jelanmathewjames Date: Tue, 11 Jun 2024 15:13:07 +0530 Subject: [PATCH] refactor: optimize leaderboard ranking query --- api/launchpad/launchpad_views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/launchpad/launchpad_views.py b/api/launchpad/launchpad_views.py index ab91cfd2..36159d8f 100644 --- a/api/launchpad/launchpad_views.py +++ b/api/launchpad/launchpad_views.py @@ -55,8 +55,8 @@ def get(self, request): expression=RowNumber(), order_by=F("karma").desc(), ) - ).order_by("rank") - + ) + paginated_queryset = CommonUtils.get_paginated_queryset( users, request,