From 1ab7d86b8e2db73e55e2edfcf2324b1e0d46875d Mon Sep 17 00:00:00 2001 From: Laurent Lasudry Date: Tue, 6 Nov 2018 06:43:39 +0100 Subject: [PATCH] Avoid to wake up each and every thesaurus object --- src/collective/dms/thesaurus/vocabulary.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/collective/dms/thesaurus/vocabulary.py b/src/collective/dms/thesaurus/vocabulary.py index 3dd3380..1055050 100644 --- a/src/collective/dms/thesaurus/vocabulary.py +++ b/src/collective/dms/thesaurus/vocabulary.py @@ -63,10 +63,8 @@ class KeywordFromSameThesaurusSource(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):