bug 812754 fixed. "unsuccessfully attempted to uncatalog an object" while trying to delete a comment.

svn path=/plone.app.discussion/trunk/; revision=27658
This commit is contained in:
Timo Stollenwerk 2009-06-24 14:57:18 +00:00
parent f088cb946e
commit 564e15af40

View File

@ -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