diff --git a/modules/scheduling/calender_fetcher.py b/modules/scheduling/calender_fetcher.py index 0c2be82477e290cc58f3239b190a35a5913f6042..e8a4ecbafc943119faf850572e4d924265eb3809 100644 --- a/modules/scheduling/calender_fetcher.py +++ b/modules/scheduling/calender_fetcher.py @@ -278,15 +278,15 @@ class CalendarFetcher: servicetype = "api_tank_playlist" playlist = None + if not playlist_id: + return None + # If playlist is already fetched, use the existing one for playlist in fetched_playlists: if playlist["id"] == playlist_id: self.logger.debug("Playlist #%s already fetched" % playlist_id) return playlist - if not playlist_id: - return None - url = self.__build_url__(servicetype, "${ID}", playlist_id) json_response = self.__fetch_data__(servicetype, url)