Reindex comments when they are modified

This commit is contained in:
Gil Forcada
2016-04-07 18:30:30 +02:00
parent 608287692c
commit 26a21a12d5
5 changed files with 22 additions and 2 deletions
+4
View File
@@ -12,6 +12,8 @@ from Products.statusmessages.interfaces import IStatusMessage
from z3c.form import button
from zope.component import getMultiAdapter
from zope.component import getUtility
from zope.event import notify
from zope.lifecycleevent import ObjectModifiedEvent
class View(BrowserView):
@@ -91,6 +93,8 @@ class EditCommentForm(CommentForm):
# Update text
self.context.text = data['text']
# Notify that the object has been modified
notify(ObjectModifiedEvent(self.context))
# Redirect to comment
IStatusMessage(self.request).add(_(u'comment_edit_notification',