Check that variable exists

merge-requests/26/head
Bob Mottram 2022-01-11 18:41:16 +00:00
parent 39401222fe
commit 5a42282475
1 changed files with 5 additions and 3 deletions

View File

@ -269,9 +269,11 @@ def _html_newswire(base_dir: str, newswire: {}, nickname: str, moderator: bool,
if len(item) > 8:
# change the link url to a podcast episode screen
podcast_properties = item[8]
if podcast_properties.get('persons') and \
podcast_properties.get('image'):
link_url = '/users/' + nickname + '/?podepisode=' + date_str
if podcast_properties:
if podcast_properties.get('persons') and \
podcast_properties.get('image'):
link_url = \
'/users/' + nickname + '/?podepisode=' + date_str
html_str += separator_str
if moderated_item and 'vote:' + nickname in item[2]: