From c135228419f8a2b94100c4d9fa5026157b70ce92 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Fri, 19 Jun 2009 10:00:31 +0000 Subject: [PATCH] Use adaption instead of calling the conversationAdapterFactory directly. svn path=/plone.app.discussion/trunk/; revision=27508 --- plone/app/discussion/browser/comments.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index 9ae9fbd..9294bf0 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -22,10 +22,9 @@ from plone.registry.interfaces import IRegistry from plone.app.layout.viewlets.common import ViewletBase -from plone.app.discussion.interfaces import IConversation, IComment, IReplies, IDiscussionSettings -from plone.app.discussion.conversation import conversationAdapterFactory - from plone.app.discussion.comment import CommentFactory +from plone.app.discussion.interfaces import IConversation, IComment, IReplies, IDiscussionSettings + class View(BrowserView): @@ -59,12 +58,10 @@ class CommentsViewlet(ViewletBase): def is_discussion_allowed(self): context = aq_inner(self.context) - conversation = conversationAdapterFactory(context) + conversation = IConversation(context) return conversation.enabled def get_replies(self, workflow_actions=False): - - # Acquisition wrap the conversation context = aq_inner(self.context) conversation = IConversation(context)