Skip to content

Commit

Permalink
Hotfix - Error when play_song returns err
Browse files Browse the repository at this point in the history
  • Loading branch information
StarDylan committed Dec 6, 2023
1 parent 8939be1 commit e6bd369
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/playlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ def play_playlist(playlist_id: int, user_id: str = Header(None)) -> SongResponse
}])

response = play_song(next_song_info.current_song_id, user_id=user_id)
if response.is_ad:

if hasattr(response, "is_ad") and response.is_ad:
# Rollback position change
conn.rollback()

Expand Down

0 comments on commit e6bd369

Please sign in to comment.