Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Update views that use the `url` field of audio sets
Dhruv Bhanushalic12360c8e76b
diff --git a/openverse_api/catalog/api/views/audio_views.py b/openverse_api/catalog/api/views/audio_views.pyindex 266626a7f..61ecc0bde 100644--- a/openverse_api/catalog/api/views/audio_views.py+++ b/openverse_api/catalog/api/views/audio_views.py@@ -65,7 +65,7 @@ class AudioViewSet(MediaViewSet):image_url = Noneif thumbnail := audio.thumbnail:image_url = thumbnail- elif audio.audio_set and (thumbnail := audio.audio_set.url):+ elif audio.audio_set and (thumbnail := audio.audio_set.thumbnail):image_url = thumbnailif not image_url:raise get_api_exception("Could not find artwork.", 404)