Check thesaurus name
authorThierry Florac <thierry.florac@onf.fr>
Wed, 11 Jul 2018 15:56:29 +0200
changeset 78 8bab1101f4ef
parent 77 5eb2f0ff9ba3
child 79 08535535b5ed
Check thesaurus name
src/pyams_thesaurus/zmi/widget/__init__.py
--- 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)