kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Fix #581: missing track count on various library cards
rodzic
a6264d7deb
commit
2b70f3ba42
|
@ -35,7 +35,7 @@ def get_libraries(filter_uploads):
|
|||
uploads = uploads.playable_by(actor)
|
||||
libraries = models.Library.objects.filter(
|
||||
pk__in=uploads.values_list("library", flat=True)
|
||||
)
|
||||
).annotate(_uploads_count=Count("uploads"))
|
||||
libraries = libraries.select_related("actor")
|
||||
page = self.paginate_queryset(libraries)
|
||||
if page is not None:
|
||||
|
|
|
@ -462,6 +462,7 @@ def test_can_get_libraries_for_music_entities(
|
|||
import_status="finished", library__privacy_level="me", track=upload.track
|
||||
).library
|
||||
library = upload.library
|
||||
setattr(library, "_uploads_count", 1)
|
||||
data = {
|
||||
"artist": upload.track.artist,
|
||||
"album": upload.track.album,
|
||||
|
|
Ładowanie…
Reference in New Issue