From ef5bf87ad426542fe80e7afdb8ef3e284d0774e1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 28 Feb 2003 22:22:57 +0000 Subject: [PATCH] - Fix small bug related to ZCTextIndex attempting to index the results of a callable. Do not attempt to index None. --- ZCTextIndex.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ZCTextIndex.py b/ZCTextIndex.py index 441c5b3..babd877 100644 --- a/ZCTextIndex.py +++ b/ZCTextIndex.py @@ -170,6 +170,8 @@ def _index_object(self, docid, obj, threshold=None, attr=None): 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