From f4d4151e97094b7d8a0af72bf1e4b7d1450ae429 Mon Sep 17 00:00:00 2001 From: Daniel Widerin Date: Tue, 24 Sep 2013 11:06:54 +0200 Subject: [PATCH] Unicode expected, but title or description could be none in SearchableText indexer. --- CHANGES.rst | 4 ++++ plone/app/contenttypes/indexers.py | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index ac8c6b1c6..2bbf7c172 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,10 @@ Changelog 1.0rc1 (2013-09-24) ------------------- +- Unicode is expected, but ``obj.title`` and/or ``obj.description`` can be + still be None in SearchableText indexer. + [saily] + - Implement a tearDownPloneSite method in testing.py to prevent test isolation problems. [timo] diff --git a/plone/app/contenttypes/indexers.py b/plone/app/contenttypes/indexers.py index 2d67206f6..d482bb949 100644 --- a/plone/app/contenttypes/indexers.py +++ b/plone/app/contenttypes/indexers.py @@ -41,7 +41,11 @@ def end_date(obj): def SearchableText(obj, text=False): - return ' '.join((obj.id, obj.title, obj.description, )) + return u" ".join(( + obj.id, + obj.title or u"", + obj.description or u"", + )) @indexer(INewsItem)