Fix #1096: Fixed wrong album and track count in admin artist API
This commit is contained in:
parent
e981f005dc
commit
4364f9b4d1
|
@ -84,8 +84,8 @@ class ManageArtistViewSet(
|
|||
music_models.Artist.objects.all()
|
||||
.order_by("-id")
|
||||
.select_related("attributed_to", "attachment_cover", "channel")
|
||||
.annotate(_tracks_count=Count("tracks"))
|
||||
.annotate(_albums_count=Count("albums"))
|
||||
.annotate(_tracks_count=Count("tracks", distinct=True))
|
||||
.annotate(_albums_count=Count("albums", distinct=True))
|
||||
.prefetch_related(music_views.TAG_PREFETCH)
|
||||
)
|
||||
serializer_class = serializers.ManageArtistSerializer
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fixed wrong album and track count in admin artist API (#1096)
|
Loading…
Reference in New Issue