conversationAdapterFactory now always returns the acquisition wrapped conversation object.

svn path=/plone.app.discussion/trunk/; revision=27500
This commit is contained in:
Timo Stollenwerk 2009-06-18 20:53:25 +00:00
parent 0a706dec70
commit 476cc1c5e7

View File

@ -308,10 +308,11 @@ def conversationAdapterFactory(content):
annotions = IAnnotations(content)
if not ANNOTATION_KEY in annotions:
conversation = Conversation()
conversation.__parent__ = aq_base(content)
annotions[ANNOTATION_KEY] = conversation
conversation = annotions[ANNOTATION_KEY]
conversation.__parent__ = aq_base(content)
return conversation
else:
conversation = annotions[ANNOTATION_KEY]
return conversation.__of__(content)
class ConversationReplies(object):
"""An IReplies adapter for conversations.