From 73559ec3b9fa4a195e0dcdfc8fd5327a508279ba Mon Sep 17 00:00:00 2001 From: Eliot Berriot <contact@eliotberriot.com> Date: Wed, 2 Nov 2016 18:58:47 +0100 Subject: [PATCH] Now order artists by name instead of creation date on index view --- funkwhale_api/music/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/funkwhale_api/music/views.py b/funkwhale_api/music/views.py index ff771dc..a2cceed 100644 --- a/funkwhale_api/music/views.py +++ b/funkwhale_api/music/views.py @@ -41,7 +41,7 @@ class TagViewSetMixin(object): class ArtistViewSet(SearchMixin, viewsets.ReadOnlyModelViewSet): queryset = ( models.Artist.objects.all() - .order_by('-creation_date') + .order_by('name') .prefetch_related( 'albums__tracks__files', 'albums__tracks__tags')) @@ -107,7 +107,7 @@ class TrackViewSet(TagViewSetMixin, SearchMixin, viewsets.ReadOnlyModelViewSet): work = track.get_work() if not work: - return Response({'error': 'unavailable work'}, status=404) + return Response({'error': 'unavailable work '}, status=404) lyrics = work.fetch_lyrics() try: -- GitLab