[Zope-Checkins] CVS: Zope2 - UnKeywordIndex.py:1.12.2.4

Jim Fulton jim@digicool.com
Wed, 28 Mar 2001 17:19:18 -0500 (EST)


Update of /cvs-repository/Zope2/lib/python/SearchIndex
In directory korak:/tmp/cvs-serv31628

Modified Files:
      Tag: zope-2_3-branch
	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:10:33	1.12.2.3
+++ UnKeywordIndex.py	2001/03/28 22:19:17	1.12.2.4
@@ -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.