make sure commenting works when caching with modified headers

This commit is contained in:
Elizabeth Leddy
2012-01-24 18:28:02 -08:00
parent c14091c734
commit 07b8ebc5df
2 changed files with 13 additions and 1 deletions
+6 -1
View File
@@ -206,9 +206,14 @@ def notify_content_object(obj, event):
"""Tell the content object when a comment is added
"""
content_obj = aq_parent(aq_parent(obj))
# set the modified date and reindex the item accordingly
# so that 304s work correctly. This means that adding a comment
# effectively counts as modifying the content type.
content_obj.setModificationDate()
content_obj.reindexObject(idxs=('total_comments',
'last_comment_date',
'commentators',))
'commentators',
'modified'))
def notify_content_object_deleted(obj, event):