Bug fix for when datavalue is missing.

This commit is contained in:
Edward Betts 2019-09-29 08:30:01 +01:00
parent 37e119f71d
commit 80303618fb

1
app.py
View file

@ -479,6 +479,7 @@ def get_other(entity):
if key not in entity['claims']:
continue
for claim in entity['claims'][key]:
if 'datavalue' in claim['mainsnak']:
other_items.add(claim['mainsnak']['datavalue']['value']['id'])
return get_labels(other_items)