[CMF-checkins] CVS: Products/CMFDefault - DiscussionTool.py:1.21.2.2
Yvo Schubbe
y.2005- at wcm-solutions.de
Sun Mar 20 15:34:35 EST 2005
Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv28092/CMFDefault
Modified Files:
Tag: CMF-1_5-branch
DiscussionTool.py
Log Message:
simplified code a bit
=== Products/CMFDefault/DiscussionTool.py 1.21.2.1 => 1.21.2.2 ===
--- Products/CMFDefault/DiscussionTool.py:1.21.2.1 Mon Jan 17 19:45:27 2005
+++ Products/CMFDefault/DiscussionTool.py Sun Mar 20 15:34:34 2005
@@ -100,14 +100,11 @@
if not self.isDiscussionAllowedFor( content ):
raise DiscussionNotAllowed
- if IDiscussionResponse.isImplementedBy(content):
+ if not IDiscussionResponse.isImplementedBy(content) and \
+ getattr( aq_base(content), 'talkback', None ) is None:
# Discussion Items use the DiscussionItemContainer object of the
- # related content item, so talkback needs to be acquired
- talkback = getattr(content, 'talkback')
- else:
- talkback = getattr( aq_base(content), 'talkback', None )
- if talkback is None:
- talkback = self._createDiscussionFor( content )
+ # related content item, so only create one for other content items
+ self._createDiscussionFor(content)
return content.talkback # Return wrapped talkback
More information about the CMF-checkins
mailing list