From 564e15af40f5060169e189807b4fef9819d7ed36 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Wed, 24 Jun 2009 14:57:18 +0000 Subject: [PATCH] bug 812754 fixed. "unsuccessfully attempted to uncatalog an object" while trying to delete a comment. svn path=/plone.app.discussion/trunk/; revision=27658 --- plone/app/discussion/browser/comments.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index a8fd8f4..4949db1 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -291,10 +291,10 @@ class DeleteComment(BrowserView): def __call__(self): - comment = aq_inner(self.context) + context = aq_inner(self.context) comment_id = self.context.id - conversation = self.context.__parent__ + conversation = aq_parent(context) del conversation[comment_id] @@ -302,7 +302,7 @@ class DeleteComment(BrowserView): IStatusMessage(self.request).addStatusMessage( _('Comment %s deleted' % comment_id), type="info") - return self.context.REQUEST.RESPONSE.redirect(self.context.REQUEST.HTTP_REFERER) + return context.REQUEST.RESPONSE.redirect(context.REQUEST.HTTP_REFERER) class PublishComment(BrowserView): """Publish a comment