From 85f0820005c8d8df2be9a2461de438fd0250e950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 26 Mar 2014 18:16:45 +0100 Subject: [PATCH] do not empty null equivs --- src/collective/dms/thesaurus/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collective/dms/thesaurus/utils.py b/src/collective/dms/thesaurus/utils.py index f1fbde1..efd9d34 100644 --- a/src/collective/dms/thesaurus/utils.py +++ b/src/collective/dms/thesaurus/utils.py @@ -46,7 +46,7 @@ class ImportJson(BrowserView): raw=term.get('scope_note'), mimeType='text/html', outputMimeType='text/x-html-safe') - object.equivs = term.get('equivalents') + object.equivs = [x for x in term.get('equivalents') or [] if x] # 2nd step; add relations for term_id, term in terms.items():