Skip to content

Commit

Permalink
Fix a bug in restat
Browse files Browse the repository at this point in the history
  • Loading branch information
amadanmath committed Nov 24, 2017
1 parent 374783d commit 2c95316
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion raidar/management/commands/restat.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def calculate_area_stats(era):
def calculate_user_stats(era):
user_queryset = User.objects.all()
for user in user_queryset.iterator():
participation_queryset = Participation.objects.prefetch_related('encounter', 'account').filter(account__user=user, era=era).order_by('?')
participation_queryset = Participation.objects.prefetch_related('encounter', 'account').filter(account__user=user, encounter__era=era).order_by('?')
totals_for_player = initialise_era_user_stats(participation_queryset.count())
for participation in participation_queryset.iterator():
add_participation_to_era_user_stats(participation, totals_for_player)
Expand Down

0 comments on commit 2c95316

Please sign in to comment.