Skip to content

Commit

Permalink
Filter out players who haven't hit threshold for ranked roles
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanB committed Sep 23, 2024
1 parent 39928a8 commit 5877f8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ranked/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_leaderboard(request: Request, game_mode_code: str) -> Response:
except GameMode.DoesNotExist:
return Response(status=404, data={'error': f'Game mode {game_mode_code} does not exist.'})

players = PlayerElo.objects.filter(game_mode=game_mode)
players = PlayerElo.objects.filter(game_mode=game_mode, matches_played__gt=20)
players = players.annotate(
time_delta=ExpressionWrapper(
timezone.now() - F('last_match_played_time'),
Expand Down

0 comments on commit 5877f8e

Please sign in to comment.