diff --git a/CHANGES.txt b/CHANGES.txt index 6c13e4c..aa5f544 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,7 +4,8 @@ Changelog 2.1.2 (unreleased) ------------------ -- nothing. +- Do not raise an error if the comment text is None. + [timo] 2.1.1 (2011-11-24) diff --git a/plone/app/discussion/comment.py b/plone/app/discussion/comment.py index 0273b6f..616d79d 100644 --- a/plone/app/discussion/comment.py +++ b/plone/app/discussion/comment.py @@ -138,6 +138,8 @@ class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable, settings = registry.forInterface(IDiscussionSettings, check=False) sourceMimetype = settings.text_transform text = self.text + if text is None: + return '' if isinstance(text, unicode): text = text.encode('utf8') return transforms.convertTo(targetMimetype,