mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 10:09:26 +02:00
Fix #1102: Do not include tracks in album API representation
This commit is contained in:
parent
929077594d
commit
55f4fde0f4
16 changed files with 37 additions and 86 deletions
|
@ -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"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue