From e23bd811cb6ea51dbe37eb53173c9bbaa067e428 Mon Sep 17 00:00:00 2001 From: aj Date: Sun, 15 Sep 2019 23:17:17 +0100 Subject: [PATCH] added handling for empty playlist response --- spotify/api/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spotify/api/api.py b/spotify/api/api.py index c48ad5f..f226bff 100644 --- a/spotify/api/api.py +++ b/spotify/api/api.py @@ -150,7 +150,7 @@ def playlist(): if user_ref.get().to_dict()['spotify_linked']: new_playlist = create_playlist(session['username'], playlist_name) - to_add['uri'] = str(new_playlist.uri) + to_add['uri'] = str(new_playlist.uri) if new_playlist is not None else None if playlist_type == 'recents': to_add['day_boundary'] = playlist_day_boundary if playlist_day_boundary is not None else 21