From 1152c9da97713c781bf80b05ee2f502bdba8b515 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= <ciaranainsworth@posteo.net>
Date: Wed, 6 Nov 2019 10:22:46 +0100
Subject: [PATCH] Resolve "Wrong sort used when sorting favorites by album
 name"

---
 api/funkwhale_api/music/views.py | 1 +
 changes/changelog.d/960.bugfix   | 1 +
 2 files changed, 2 insertions(+)
 create mode 100644 changes/changelog.d/960.bugfix

diff --git a/api/funkwhale_api/music/views.py b/api/funkwhale_api/music/views.py
index 580ac28b7..c451d6b76 100644
--- a/api/funkwhale_api/music/views.py
+++ b/api/funkwhale_api/music/views.py
@@ -269,6 +269,7 @@ class TrackViewSet(common_views.SkipFilterForGetObject, viewsets.ReadOnlyModelVi
     ordering_fields = (
         "creation_date",
         "title",
+        "album__title",
         "album__release_date",
         "size",
         "position",
diff --git a/changes/changelog.d/960.bugfix b/changes/changelog.d/960.bugfix
new file mode 100644
index 000000000..a3082e85d
--- /dev/null
+++ b/changes/changelog.d/960.bugfix
@@ -0,0 +1 @@
+Fixed issue with sorting by album name not working (#960)
\ No newline at end of file
-- 
GitLab