summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Lasudry <lasudry@gmail.com>2018-11-06 05:43:39 (GMT)
committerLaurent Lasudry <lasudry@gmail.com>2018-11-06 05:43:39 (GMT)
commit1ab7d86b8e2db73e55e2edfcf2324b1e0d46875d (patch)
treee470295afabb79f385054dc9c0d0de5b2c397643
parent8ebb1172c57c62b64e9af40794ae23cd672edd60 (diff)
downloadcollective.dms.thesaurus-master.zip
collective.dms.thesaurus-master.tar.gz
collective.dms.thesaurus-master.tar.bz2
Avoid to wake up each and every thesaurus objectHEADmaster
-rw-r--r--src/collective/dms/thesaurus/vocabulary.py4
1 files changed, 1 insertions, 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):