Make sure the __parent__ pointer (the conversation) of a comment is not acquisition wrapped in conversation.addComment. This fixes Refs #11157.

svn path=/plone.app.discussion/trunk/; revision=40374
This commit is contained in:
Timo Stollenwerk 2010-09-28 10:37:40 +00:00
parent a55ff5b883
commit 138942470c
2 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,9 @@ Changelog
1.0b8 (unreleased)
------------------
- Make sure the __parent__ pointer (the conversation) of a comment is not
acquisition wrapped in conversation.addComment. This fixes Refs #11157.
- Revert r35608 since this was breaking the comment moderation bulk actions.
The BulkActionsView expects the absolute path of the comments without the
portal url (e.g. '/plone/doc1/++conversation++default/1285346769126020').

View File

@ -232,7 +232,7 @@ class Conversation(Traversable, Persistent, Explicit):
notify(ObjectWillBeAddedEvent(comment, self, id))
self._comments[id] = comment
comment.__parent__ = self
comment.__parent__ = aq_base(self)
# Record unique users who've commented (for logged in users only)
commentator = comment.author_username