Skip to content

Commit

Permalink
Unicode expected, but title or description could be none in Searchabl…
Browse files Browse the repository at this point in the history
…eText indexer.
  • Loading branch information
saily committed Sep 24, 2013
1 parent 7e9161c commit f4d4151
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.rst
Expand Up @@ -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]
Expand Down
6 changes: 5 additions & 1 deletion plone/app/contenttypes/indexers.py
Expand Up @@ -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)
Expand Down

1 comment on commit f4d4151

@mister-roboto
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing information:

Please sign in to comment.