Skip to content

Commit

Permalink
Merge pull request #2240 from aswanthabam/dev
Browse files Browse the repository at this point in the history
fix: rank calculation issue fixed
  • Loading branch information
nashnsulthan authored Oct 8, 2024
2 parents f9ba1ac + 2e24a46 commit 08612be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/dashboard/profile/profile_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def get_rank(self, obj):
]
)
)
.order_by("-karma")
.order_by("-karma", "-updated_at", "created_at")
)
ranks = list(ranks.values_list("user_id", flat=True))
return ranks.index(obj.id) + 1
Expand Down Expand Up @@ -284,7 +284,7 @@ def get_rank(self, obj):
]
)
)
.order_by("-karma")
.order_by("-karma", "-updated_at", "created_at")
)

ranks = list(ranks.values_list("user_id", flat=True))
Expand Down

0 comments on commit 08612be

Please sign in to comment.