[Zope-Checkins] CVS: Zope2 - UnKeywordIndex.py:1.16
Jim Fulton
jim@digicool.com
Wed, 28 Mar 2001 17:35:30 -0500 (EST)
Update of /cvs-repository/Zope2/lib/python/SearchIndex
In directory korak:/tmp/cvs-serv1794
Modified Files:
UnKeywordIndex.py
Log Message:
Fixed bug in indexing objects with no keywords, which generated
spurious log entry about unindexing a non-existent object.
--- Updated File UnKeywordIndex.py in package Zope2 --
--- UnKeywordIndex.py 2001/03/15 13:16:24 1.15
+++ UnKeywordIndex.py 2001/03/28 22:35:29 1.16
@@ -111,16 +111,12 @@
# self.id is the name of the index, which is also the name of the
# attribute we're interested in. If the attribute is callable,
# we'll do so.
- newKeywords = getattr(obj, self.id, None)
+ newKeywords = getattr(obj, self.id, ())
if callable(newKeywords):
newKeywords = newKeywords()
if type(newKeywords) is StringType:
newKeywords = (newKeywords, )
-
- if newKeywords is None:
- self.unindex_object(documentId)
- return 0
# Now comes the fun part, we need to figure out what's changed
# if anything from the previous record.