Skip to content

Commit

Permalink
improve interact with active tenhou accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
unStatiK committed Jan 27, 2025
1 parent bb99d42 commit c2f5182
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions server/player/tenhou/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

class TenhouActiveNicknameManager(models.Manager):
def get_queryset(self):
queryset = super(TenhouActiveNicknameManager, self).get_queryset()
return queryset.filter(is_active=True)
return super(TenhouActiveNicknameManager, self).get_queryset()


class TenhouNickname(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions server/player/tenhou/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def games_history(request, year=None, month=None, day=None):
games = (
TenhouGameLog.objects.filter(game_date__date=query_date)
.filter(game_players=TenhouGameLog.FOUR_PLAYERS)
.filter(tenhou_object__is_active=True)
.prefetch_related("tenhou_object")
.prefetch_related("tenhou_object__player")
.order_by("-game_date")
Expand Down

0 comments on commit c2f5182

Please sign in to comment.