fix redirect to content object after calling the add-comment view.

svn path=/plone.app.discussion/trunk/; revision=27117
This commit is contained in:
Timo Stollenwerk 2009-05-26 07:22:36 +00:00
parent 81affa21c3
commit c7a898933a

View File

@ -2,7 +2,7 @@ from zope.interface import implements
from zope.component import getMultiAdapter
from zope.viewlet.interfaces import IViewlet
from Acquisition import aq_inner
from Acquisition import aq_inner, aq_parent
from Products.Five.browser import BrowserView
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
@ -59,5 +59,4 @@ class AddComment(BrowserView):
conversation.addComment(comment)
# TODO: Redirect to the document object page
# conversation.__parent__ is not working?!
#self.request.response.redirect(aq_inner(self.context).absolute_url())
self.request.response.redirect(aq_parent(aq_inner(self.context)).absolute_url())