Skip to content

Commit

Permalink
Fixing error adding tv shows to watchlist
Browse files Browse the repository at this point in the history
TV shows have a `null` video, so when explicitly trying to get properties from it there will be an error accessing that property.
  • Loading branch information
darkarp authored Oct 30, 2021
1 parent fcac845 commit 0dc9f38
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,7 @@ class MarshallerService {
response['lastUpdated'] = watchlistEntry.lastUpdated

response['tvShow'] = watchlistEntry.tvShow
response['video'] = [
id: watchlistEntry.video.id,
mediaType: watchlistEntry.video.getType(),
poster_path: watchlistEntry.video.getPosterPath(),
inWatchlist: watchlistEntry.video.inWatchlist(),
release_date: watchlistEntry.video.getReleaseDate()
]
response['video'] = watchlistEntry.video

return response
}
Expand Down

0 comments on commit 0dc9f38

Please sign in to comment.