src/pyams_thesaurus/zmi/widget/__init__.py
changeset 78 8bab1101f4ef
parent 77 5eb2f0ff9ba3
child 87 dfe19304d980
--- a/src/pyams_thesaurus/zmi/widget/__init__.py	Wed Jul 11 10:18:57 2018 +0200
+++ b/src/pyams_thesaurus/zmi/widget/__init__.py	Wed Jul 11 15:56:29 2018 +0200
@@ -178,7 +178,7 @@
 
     @property
     def top_terms(self):
-        thesaurus = query_utility(IThesaurus, name=self.thesaurus_name)
+        thesaurus = query_utility(IThesaurus, name=self.thesaurus_name or '')
         if thesaurus is not None:
             return sorted(thesaurus.get_top_terms(extract=self.extract_name),
                           key=lambda x: x.label)