mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-10 08:42:20 +01:00
Fix unique requests stats ordering
This commit is contained in:
@ -60,7 +60,7 @@ def compute_stats():
|
||||
'user__id', 'user__name').annotate(
|
||||
total_requests=Count('id', distinct=True),
|
||||
unique_requests=Count('song__id', distinct=True)).order_by(
|
||||
'-total_requests')[:settings.STATS_TOP_COUNT]
|
||||
'-unique_requests')[:settings.STATS_TOP_COUNT]
|
||||
|
||||
total_unique_requests = PlaylistSong.objects.filter(state=2).exclude(
|
||||
Q(user_id=None)
|
||||
|
||||
Reference in New Issue
Block a user