From 138942470c2bd5c561cc48cc70ac1b918df3fce1 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Tue, 28 Sep 2010 10:37:40 +0000 Subject: [PATCH] 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 --- CHANGES.txt | 3 +++ plone/app/discussion/conversation.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6606e8e..36c437d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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'). diff --git a/plone/app/discussion/conversation.py b/plone/app/discussion/conversation.py index e716c8a..8ad6c72 100644 --- a/plone/app/discussion/conversation.py +++ b/plone/app/discussion/conversation.py @@ -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