Fixed an issue with excluded artists

This commit is contained in:
Eliot Berriot 2019-02-25 10:36:02 +01:00
parent 9d7cd00649
commit d23d69e11d
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
1 changed files with 1 additions and 1 deletions

View File

@ -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(