equal
deleted
inserted
replaced
176 class ThesaurusTermsTreeWidget(ThesaurusTermsListWidget): |
176 class ThesaurusTermsTreeWidget(ThesaurusTermsListWidget): |
177 """Thesaurus terms tree widget""" |
177 """Thesaurus terms tree widget""" |
178 |
178 |
179 @property |
179 @property |
180 def top_terms(self): |
180 def top_terms(self): |
181 thesaurus = query_utility(IThesaurus, name=self.thesaurus_name) |
181 thesaurus = query_utility(IThesaurus, name=self.thesaurus_name or '') |
182 if thesaurus is not None: |
182 if thesaurus is not None: |
183 return sorted(thesaurus.get_top_terms(extract=self.extract_name), |
183 return sorted(thesaurus.get_top_terms(extract=self.extract_name), |
184 key=lambda x: x.label) |
184 key=lambda x: x.label) |
185 else: |
185 else: |
186 return () |
186 return () |