diff --git a/depicts/wikibase.py b/depicts/wikibase.py index 28389e5..0c2a4d0 100644 --- a/depicts/wikibase.py +++ b/depicts/wikibase.py @@ -5,6 +5,8 @@ def first_datavalue(entity, pid): return mainsnak['datavalue']['value'] def get_entity_label(entity): + if 'labels' not in entity: + return None if 'en' in entity['labels']: return entity['labels']['en']['value']