added handling for empty playlist response

This commit is contained in:
aj 2019-09-15 23:17:17 +01:00
parent dfeb1555c8
commit e23bd811cb

View File

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