Do not raise an error if the comment text is None.
This commit is contained in:
parent
ead76ee406
commit
6a7c89ec78
@ -4,7 +4,8 @@ Changelog
|
|||||||
2.1.2 (unreleased)
|
2.1.2 (unreleased)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
- nothing.
|
- Do not raise an error if the comment text is None.
|
||||||
|
[timo]
|
||||||
|
|
||||||
|
|
||||||
2.1.1 (2011-11-24)
|
2.1.1 (2011-11-24)
|
||||||
|
@ -138,6 +138,8 @@ class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable,
|
|||||||
settings = registry.forInterface(IDiscussionSettings, check=False)
|
settings = registry.forInterface(IDiscussionSettings, check=False)
|
||||||
sourceMimetype = settings.text_transform
|
sourceMimetype = settings.text_transform
|
||||||
text = self.text
|
text = self.text
|
||||||
|
if text is None:
|
||||||
|
return ''
|
||||||
if isinstance(text, unicode):
|
if isinstance(text, unicode):
|
||||||
text = text.encode('utf8')
|
text = text.encode('utf8')
|
||||||
return transforms.convertTo(targetMimetype,
|
return transforms.convertTo(targetMimetype,
|
||||||
|
Loading…
Reference in New Issue
Block a user