[Zope-Checkins] CVS: Zope/lib/python/Products/ZCTextIndex - ZCTextIndex.py:1.46
Chris McDonough
chrism@zope.com
Fri, 28 Feb 2003 17:22:57 -0500
Update of /cvs-repository/Zope/lib/python/Products/ZCTextIndex
In directory cvs.zope.org:/tmp/cvs-serv27624
Modified Files:
ZCTextIndex.py
Log Message:
- Fix small bug related to ZCTextIndex attempting to index the
results of a callable. Do not attempt to index None.
=== Zope/lib/python/Products/ZCTextIndex/ZCTextIndex.py 1.45 => 1.46 ===
--- Zope/lib/python/Products/ZCTextIndex/ZCTextIndex.py:1.45 Sun Feb 2 14:18:11 2003
+++ Zope/lib/python/Products/ZCTextIndex/ZCTextIndex.py Fri Feb 28 17:22:57 2003
@@ -170,6 +170,8 @@
return 0
if callable(text):
text = text()
+ if text is None:
+ return 0
count = self.index.index_doc(docid, text)
self._p_changed = 1 # XXX
return count