Skip to content

Commit

Permalink
missing gameseason filters
Browse files Browse the repository at this point in the history
  • Loading branch information
jimdaga committed Aug 20, 2024
1 parent 46b60fb commit ee2f41e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pickem/pickem_homepage/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ def scores(request):

points = GamePicks.objects.filter(gameseason=gameseason, gameWeek=game_week, competition=game_competition, pick_correct=True)
points_total = GamePicks.objects.filter(gameseason=gameseason, gameWeek=game_week, competition=game_competition, pick_correct=True).count
# user_points = points.values('uid').order_by('-uid').annotate(wins=Count('uid')).order_by('-wins')
user_points = points.values('uid').annotate(wins=Coalesce(Count('uid'), 0)).order_by('-wins', '-uid')

user_points = points.filter(gameseason=gameseason).values('uid').annotate(wins=Coalesce(Count('uid'), 0)).order_by('-wins', '-uid')

users_w_points = user_points.values_list('uid', flat=True).distinct()
users_w_points = user_points.filter(gameseason=gameseason).values_list('uid', flat=True).distinct()



Expand Down

0 comments on commit ee2f41e

Please sign in to comment.