handle absence of thesaurus (bis)

This commit is contained in:
Frédéric Péters 2013-04-14 17:38:16 +02:00
parent da58a1a6c2
commit 37137022dd
1 changed files with 2 additions and 0 deletions

View File

@ -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