Add handling of exceptional case with missing network name (NoneType) in Episode View.

A show should always have an original broadcaster (network), however, user input errors mean that a show can get added without this fundamental detail.
This commit is contained in:
JackDandy 2015-01-21 16:07:24 +00:00
parent 4840059694
commit a461961c84
3 changed files with 7 additions and 2 deletions

View file

@ -13,6 +13,7 @@
* Change anime release groups to in memory storage for lowered latency * Change anime release groups to in memory storage for lowered latency
* Change adjust menu delay and hover styling * Change adjust menu delay and hover styling
* Fix provider list color * Fix provider list color
* Add handling of exceptional case with missing network name (NoneType) in Episode View
[develop changelog] [develop changelog]

View file

@ -768,7 +768,9 @@ class CMD_ComingEpisodes(ApiCall):
(b['data_show_name'], b['parsed_datetime'], b['season'], b['episode']))) (b['data_show_name'], b['parsed_datetime'], b['season'], b['episode'])))
} }
def value_maybe_article(value=''): def value_maybe_article(value=None):
if None is value:
return ''
return (remove_article(value.lower()), value.lower())[sickbeard.SORT_ARTICLE] return (remove_article(value.lower()), value.lower())[sickbeard.SORT_ARTICLE]
# add parsed_datetime to the dict # add parsed_datetime to the dict

View file

@ -415,7 +415,9 @@ class MainHandler(RequestHandler):
(b['localtime'], b['data_show_name'], b['season'], b['episode']))) (b['localtime'], b['data_show_name'], b['season'], b['episode'])))
} }
def value_maybe_article(value=''): def value_maybe_article(value=None):
if None is value:
return ''
return (remove_article(value.lower()), value.lower())[sickbeard.SORT_ARTICLE] return (remove_article(value.lower()), value.lower())[sickbeard.SORT_ARTICLE]
# add localtime to the dict # add localtime to the dict