From 01915f91cf661838547cbfaa65b53c8c5320ad26 Mon Sep 17 00:00:00 2001 From: Karl Sickendick Date: Sun, 16 Feb 2025 23:37:45 +0000 Subject: [PATCH] Attempt to fix issue #2122 --- api/funkwhale_api/subsonic/views.py | 4 ++-- changes/changelog.d/2122.bugfix | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changes/changelog.d/2122.bugfix diff --git a/api/funkwhale_api/subsonic/views.py b/api/funkwhale_api/subsonic/views.py index 494a3516a..cd02cabf1 100644 --- a/api/funkwhale_api/subsonic/views.py +++ b/api/funkwhale_api/subsonic/views.py @@ -893,7 +893,7 @@ class SubsonicViewSet(viewsets.GenericViewSet): .select_related("attachment_cover") .get(pk=artist_id) ) - except (TypeError, ValueError, music_models.Album.DoesNotExist): + except (TypeError, ValueError, music_models.Artist.DoesNotExist): return response.Response( {"error": {"code": 70, "message": "cover art not found."}} ) @@ -902,7 +902,7 @@ class SubsonicViewSet(viewsets.GenericViewSet): try: attachment_id = id.replace("at-", "") attachment = common_models.Attachment.objects.get(uuid=attachment_id) - except (TypeError, ValueError, music_models.Album.DoesNotExist): + except (TypeError, ValueError, common_models.Attachment.DoesNotExist): return response.Response( {"error": {"code": 70, "message": "cover art not found."}} ) diff --git a/changes/changelog.d/2122.bugfix b/changes/changelog.d/2122.bugfix new file mode 100644 index 000000000..a9a32d5a9 --- /dev/null +++ b/changes/changelog.d/2122.bugfix @@ -0,0 +1 @@ +Fixed the exceptions caught in two places in the getCoverArt subsonic API (#2122)