Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Philipp Wolfer
funkwhale
Commits
4364f9b4
Unverified
Commit
4364f9b4
authored
May 04, 2020
by
Agate
💬
Browse files
Fix #1096: Fixed wrong album and track count in admin artist API
parent
e981f005
Changes
2
Hide whitespace changes
Inline
Side-by-side
api/funkwhale_api/manage/views.py
View file @
4364f9b4
...
...
@@ -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
...
...
changes/changelog.d/1096.bugfix
0 → 100644
View file @
4364f9b4
Fixed wrong album and track count in admin artist API (#1096)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment