From 970a5c53b75d90e94d38bba6991cbf0d7c13d966 Mon Sep 17 00:00:00 2001 From: Vincent Fretin Date: Tue, 3 Sep 2013 15:42:30 +0200 Subject: [PATCH] test if thesaurus if present --- src/collective/dms/thesaurus/keywordsfield.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/collective/dms/thesaurus/keywordsfield.py b/src/collective/dms/thesaurus/keywordsfield.py index c9de03f..fafd684 100644 --- a/src/collective/dms/thesaurus/keywordsfield.py +++ b/src/collective/dms/thesaurus/keywordsfield.py @@ -73,6 +73,9 @@ class ThesaurusKeywordsWidget(SequenceWidget): def displayItems(self): thesaurus = utils.get_thesaurus_object(self.context) + if thesaurus is None: + return [] + thesaurus_path = '/'.join(thesaurus.getPhysicalPath()) value = [] for token in self.value: