mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 05:19:56 +02:00
Fx #986: Fixed invalid displayed number of tracks in playlist
This commit is contained in:
parent
8cf003ab1c
commit
c8702ca726
3 changed files with 14 additions and 1 deletions
|
@ -24,7 +24,7 @@ class PlaylistViewSet(
|
|||
queryset = (
|
||||
models.Playlist.objects.all()
|
||||
.select_related("user__actor")
|
||||
.annotate(tracks_count=Count("playlist_tracks"))
|
||||
.annotate(tracks_count=Count("playlist_tracks", distinct=True))
|
||||
.with_covers()
|
||||
.with_duration()
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue