Skip to content
Snippets Groups Projects
Verified Commit af82111a authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Missing select related on trackfile viewset

parent 1bc4ceab
No related branches found
No related tags found
No related merge requests found
......@@ -296,7 +296,11 @@ def handle_serve(track_file):
class TrackFileViewSet(viewsets.ReadOnlyModelViewSet):
queryset = (models.TrackFile.objects.all().order_by('-id'))
queryset = (
models.TrackFile.objects.all()
.select_related('track__artist', 'track__album')
.order_by('-id')
)
serializer_class = serializers.TrackFileSerializer
authentication_classes = rest_settings.api_settings.DEFAULT_AUTHENTICATION_CLASSES + [
SignatureAuthentication
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment