diff --git a/api/funkwhale_api/playlists/serializers.py b/api/funkwhale_api/playlists/serializers.py
index 87350cd04a3bec09e04cf19bd186fefeb7dfbe7d..8e1227da050ac274bb585135f989c872089a5445 100644
--- a/api/funkwhale_api/playlists/serializers.py
+++ b/api/funkwhale_api/playlists/serializers.py
@@ -117,10 +117,10 @@ class PlaylistSerializer(serializers.ModelSerializer):
         except AttributeError:
             return []
 
+        excluded_artists = []
         try:
             user = self.context["request"].user
         except (KeyError, AttributeError):
-            excluded_artists = []
             user = None
         if user and user.is_authenticated:
             excluded_artists = list(