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

3
app.py
View file

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