From 476cc1c5e75b2cffab0e5895c196842b25ad08c7 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 18 Jun 2009 20:53:25 +0000 Subject: [PATCH] conversationAdapterFactory now always returns the acquisition wrapped conversation object. svn path=/plone.app.discussion/trunk/; revision=27500 --- plone/app/discussion/conversation.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plone/app/discussion/conversation.py b/plone/app/discussion/conversation.py index f9a1c1b..7a6fc3f 100644 --- a/plone/app/discussion/conversation.py +++ b/plone/app/discussion/conversation.py @@ -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.