diff --git a/marietje/stats/utils.py b/marietje/stats/utils.py index adf2e0a..513580e 100644 --- a/marietje/stats/utils.py +++ b/marietje/stats/utils.py @@ -206,8 +206,8 @@ def user_stats(request): most_played_artists = PlaylistSong.objects.filter( user__id=request, state=2, song_id__isnull=False).values('song__artist').annotate( - total=Count('song__artist')).order_by('-total', - 'song__artist')[:settings.STATS_TOP_COUNT] + total=Count('song__artist')).order_by('-total', + 'song__artist')[:settings.STATS_TOP_COUNT] most_played_uploaders = PlaylistSong.objects.filter( user__id=request, state=2).exclude( @@ -236,9 +236,9 @@ def user_stats(request): most_played_uploaded_artists = PlaylistSong.objects.filter( state=2, song_id__in=Song.objects.filter(user__id=request)).exclude( user__id=None).values('song__artist').annotate(total=Count('song__artist', - filter=~Q(user__id=request)), user_total=Count('id', - filter=Q(user__id=request))).order_by( - '-total', 'song__artist') + filter=~Q(user__id=request)), user_total=Count('id', + filter=Q(user__id=request))).order_by( + '-total', 'song__artist') most_played = list(most_played_uploads) total_played_uploads = 0