[Checkins] SVN: Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/ZCTextIndex.py actually preserve the index_document optimization
Hano Schlichting
cvs-admin at zope.org
Mon Dec 3 10:07:33 UTC 2012
Log message for revision 128485:
actually preserve the index_document optimization
Changed:
U Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/ZCTextIndex.py
-=-
Modified: Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/ZCTextIndex.py
===================================================================
--- Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/ZCTextIndex.py 2012-12-03 10:06:36 UTC (rev 128484)
+++ Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/ZCTextIndex.py 2012-12-03 10:07:32 UTC (rev 128485)
@@ -182,9 +182,7 @@
continue
if safe_callable(text):
text = text()
- if text is None:
- continue
- if text:
+ if text is not None:
if isinstance(text, (list, tuple, )):
all_texts.extend(text)
else:
@@ -192,7 +190,7 @@
# Check that we're sending only strings
all_texts = [t for t in all_texts if isinstance(t, basestring)]
- if all_texts or self.index.length():
+ if all_texts:
return self.index.index_doc(documentId, all_texts)
return 0
More information about the checkins
mailing list