Fixed an issue with excluded artists

environments/review-front-funk-hw5oiw/deployments/814
Eliot Berriot 2019-02-25 10:36:02 +01:00
rodzic 9d7cd00649
commit d23d69e11d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -117,10 +117,10 @@ class PlaylistSerializer(serializers.ModelSerializer):
except AttributeError: except AttributeError:
return [] return []
excluded_artists = []
try: try:
user = self.context["request"].user user = self.context["request"].user
except (KeyError, AttributeError): except (KeyError, AttributeError):
excluded_artists = []
user = None user = None
if user and user.is_authenticated: if user and user.is_authenticated:
excluded_artists = list( excluded_artists = list(