diff --git a/README.txt b/README.txt index 1bb2288..46fe4c7 100755 --- a/README.txt +++ b/README.txt @@ -317,8 +317,8 @@ Index attributes adapter >>> from loops.resource import IndexAttributes >>> idx = IndexAttributes(doc1) - >>> idx.text() is None - True + >>> idx.text() + '' >>> idx.title() u'doc1 Zope Info' diff --git a/resource.py b/resource.py index e8b6dbd..b251565 100644 --- a/resource.py +++ b/resource.py @@ -237,7 +237,7 @@ class IndexAttributes(object): def text(self): context = self.context if not context.contentType.startswith('text'): - return None + return '' data = context.data # TODO: transform to plain text #return ' '.join((zapi.getName(context), context.title, data)).strip() @@ -249,7 +249,7 @@ class IndexAttributes(object): class IndexableResource(object): - """ Used for TextIndexNG. + """ Used for TextIndexNG - obsolete. """ implements(IIndexableContent)