Bug fix for when datavalue is missing.
This commit is contained in:
parent
37e119f71d
commit
80303618fb
1
app.py
1
app.py
|
@ -479,6 +479,7 @@ 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]:
|
||||||
|
if 'datavalue' in claim['mainsnak']:
|
||||||
other_items.add(claim['mainsnak']['datavalue']['value']['id'])
|
other_items.add(claim['mainsnak']['datavalue']['value']['id'])
|
||||||
|
|
||||||
return get_labels(other_items)
|
return get_labels(other_items)
|
||||||
|
|
Loading…
Reference in a new issue