Don't crash when there is no image.

This commit is contained in:
Edward Betts 2019-10-10 19:52:51 +01:00
parent 2a819fb8b1
commit 66cbf3b670
2 changed files with 8 additions and 3 deletions

5
app.py
View file

@ -333,7 +333,10 @@ def item_page(item_id):
width = 800
image_filename = item.image_filename
image = image_with_cache(qid, image_filename, width)
if image_filename:
image = image_with_cache(qid, image_filename, width)
else:
image = None
# hits = item.run_query()
label_and_language = get_entity_label_and_language(entity)