Fix #1102: Do not include tracks in album API representation

This commit is contained in:
Agate 2020-07-06 10:16:45 +02:00
parent 929077594d
commit 55f4fde0f4
16 changed files with 37 additions and 86 deletions

View file

@ -319,10 +319,6 @@ class AlbumQuerySet(common_models.LocalFromFidQuerySet, models.QuerySet):
else:
return self.exclude(pk__in=matches)
def with_prefetched_tracks_and_playable_uploads(self, actor):
tracks = Track.objects.with_playable_uploads(actor)
return self.prefetch_related(models.Prefetch("tracks", queryset=tracks))
class Album(APIModelMixin):
title = models.CharField(max_length=MAX_LENGTHS["ALBUM_TITLE"])