Make sure the comment brains are updated properly when the content object is renamed. Thanks hannosch for the code review.

svn path=/plone.app.discussion/trunk/; revision=51526
This commit is contained in:
Timo Stollenwerk
2011-08-04 14:13:01 +00:00
parent ca163009cc
commit 0e47299c75
4 changed files with 23 additions and 4 deletions
+1 -2
View File
@@ -223,8 +223,7 @@ def notify_content_object_moved(obj, event):
"""Update all comments of a content object that has been moved.
"""
if event.oldParent is None or event.newParent is None \
or event.oldName is None or event.newName is None \
or event.oldParent == event.newParent:
or event.oldName is None or event.newName is None:
return
# Remove comments at the old location from catalog
catalog = getToolByName(obj, 'portal_catalog')