Reindex comments when they are modified
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user