From f2a264054ce74af54ff5a7c7e8037263e0dbdc58 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Tue, 8 Oct 2019 11:43:05 +0100 Subject: [PATCH] fix error when no useful label --- depicts/human.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depicts/human.py b/depicts/human.py index d7c71af..c3c76de 100644 --- a/depicts/human.py +++ b/depicts/human.py @@ -56,5 +56,5 @@ def from_name(name): if 'en' in entity['descriptions']: i['description'] = entity['descriptions']['en']['value'] found.append(i) - found.sort(key=lambda i: i['label']) + found.sort(key=lambda i: i.get('label', '')) return found