Thanks TonyWagner for the project. Long time mlbserver user.
get_team_game throws an exception if there are no current game feeds.
Maybe check if the properties exist on the feed object like this?
if 'mediaId' in feed and 'teamId' in feed and 'language' in feed and 'state' in feed and feed['teamId'] == teamId and feed['language'] == 'en' and (feed['state'] == 'MEDIA_ON' or (date is not None and feed['state'] != 'MEDIA_OFF')):
Thanks TonyWagner for the project. Long time mlbserver user.
get_team_game throws an exception if there are no current game feeds.
Maybe check if the properties exist on the feed object like this?
if 'mediaId' in feed and 'teamId' in feed and 'language' in feed and 'state' in feed and feed['teamId'] == teamId and feed['language'] == 'en' and (feed['state'] == 'MEDIA_ON' or (date is not None and feed['state'] != 'MEDIA_OFF')):