Protect against missing canonical in conversationCanonicalAdapterFactory.

svn path=/plone.app.discussion/trunk/; revision=37410
This commit is contained in:
Hanno Schlichting 2010-06-25 17:16:15 +00:00
parent a8ccdc7b02
commit 9d396e43f1
2 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,9 @@ Changelog
1.0b5 (unreleased)
------------------
* Protect against missing canonical in conversationCanonicalAdapterFactory.
[hannosch]
* Documentation for Captcha plugin architecture and email notification added.
See http://packages.python.org/plone.app.discussion.
[timo]

View File

@ -373,7 +373,9 @@ else:
so that comments will be shared across all translations.
"""
if ITranslatable.providedBy(content):
content = content.getCanonical()
canonical = content.getCanonical()
if canonical is not None:
return conversationAdapterFactory(canonical)
return conversationAdapterFactory(content)