Avoid to wake up each and every thesaurus object
It's not needed as we only use id and title
This commit is contained in:
parent
c1da50265a
commit
8ebb1172c5
|
@ -4,3 +4,4 @@
|
|||
- Cédric Messiant, Ecreall
|
||||
- Frédéric Peters, Entr'ouvert
|
||||
- David Convent, Entr'ouvert
|
||||
- Laurent Lasudry, Affinitic
|
||||
|
|
|
@ -32,9 +32,8 @@ class SimpleThesaurusSource(object):
|
|||
catalog = getToolByName(context, 'portal_catalog')
|
||||
results = catalog(portal_type='dmskeyword',
|
||||
path={'query': thesaurus_path,'depth': 1})
|
||||
keywords = [x.getObject() for x in results]
|
||||
keyword_terms = [SimpleVocabulary.createTerm(
|
||||
x.id, x.id, x.title) for x in keywords]
|
||||
x.getId, x.getId, x.Title) for x in results]
|
||||
return SimpleVocabulary(keyword_terms)
|
||||
|
||||
def __iter__(self):
|
||||
|
|
Reference in New Issue