From 37137022ddd5dc0c1c7f2ee51f3ef94f391fd5fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 14 Apr 2013 17:38:16 +0200 Subject: [PATCH] handle absence of thesaurus (bis) --- src/collective/dms/thesaurus/keywordsfield.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/collective/dms/thesaurus/keywordsfield.py b/src/collective/dms/thesaurus/keywordsfield.py index b269a9e..c9de03f 100644 --- a/src/collective/dms/thesaurus/keywordsfield.py +++ b/src/collective/dms/thesaurus/keywordsfield.py @@ -52,6 +52,8 @@ class ThesaurusKeywordsWidget(SequenceWidget): @property def js(self): thesaurus = utils.get_thesaurus_object(self.context) + if thesaurus is None: + return '' thesaurus_path = '/'.join(thesaurus.getPhysicalPath()) return JS_TEMPLATE % dict( thesaurus_url=thesaurus_path