From 0ecdd7c0fba3a55575545a2a98b50a98d70a62d6 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Fri, 25 Oct 2019 11:58:58 +0200 Subject: [PATCH] Fixed broken getUser subsonic endpoint --- api/funkwhale_api/subsonic/serializers.py | 2 +- api/tests/subsonic/test_views.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/funkwhale_api/subsonic/serializers.py b/api/funkwhale_api/subsonic/serializers.py index 8e881f24d..cae99e242 100644 --- a/api/funkwhale_api/subsonic/serializers.py +++ b/api/funkwhale_api/subsonic/serializers.py @@ -295,7 +295,7 @@ def get_user_detail_data(user): "playlistRole": "true", "streamRole": "true", "jukeboxRole": "true", - "folder": [f["id"] for f in get_folders(user)], + "folder": [{"value": f["id"]} for f in get_folders(user)], } diff --git a/api/tests/subsonic/test_views.py b/api/tests/subsonic/test_views.py index d58cc3932..4f22b96ee 100644 --- a/api/tests/subsonic/test_views.py +++ b/api/tests/subsonic/test_views.py @@ -762,7 +762,8 @@ def test_get_user(f, db, logged_in_api_client, factories): "coverArtRole": "false", "shareRole": "false", "folder": [ - f["id"] for f in serializers.get_folders(logged_in_api_client.user) + {"value": f["id"]} + for f in serializers.get_folders(logged_in_api_client.user) ], } }