fix error when no useful label

This commit is contained in:
Edward Betts 2019-10-08 11:43:05 +01:00
parent bb68a46f59
commit f2a264054c

View file

@ -56,5 +56,5 @@ def from_name(name):
if 'en' in entity['descriptions']: if 'en' in entity['descriptions']:
i['description'] = entity['descriptions']['en']['value'] i['description'] = entity['descriptions']['en']['value']
found.append(i) found.append(i)
found.sort(key=lambda i: i['label']) found.sort(key=lambda i: i.get('label', ''))
return found return found