[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/KeywordIndex - KeywordIndex.py:1.14
Casey Duncan
casey@zope.com
Fri, 28 Feb 2003 10:52:04 -0500
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/KeywordIndex
In directory cvs.zope.org:/tmp/cvs-serv23228
Modified Files:
KeywordIndex.py
Log Message:
Merge keyindex unique value fix (issue #828)
=== Zope/lib/python/Products/PluginIndexes/KeywordIndex/KeywordIndex.py 1.13 => 1.14 ===
--- Zope/lib/python/Products/PluginIndexes/KeywordIndex/KeywordIndex.py:1.13 Thu Jan 23 12:46:23 2003
+++ Zope/lib/python/Products/PluginIndexes/KeywordIndex/KeywordIndex.py Fri Feb 28 10:51:33 2003
@@ -90,7 +90,13 @@
if callable(newKeywords):
newKeywords = newKeywords()
if hasattr(newKeywords,'capitalize'): # is it string-like ?
- newKeywords = (newKeywords, )
+ newKeywords = [newKeywords]
+ else:
+ # Uniqueify keywords
+ unique = {}
+ for k in newKeywords:
+ unique[k] = None
+ newKeywords = unique.keys()
return newKeywords
def unindex_objectKeywords(self, documentId, keywords):