[CMF-checkins] CVS: Products/CMFDefault - DiscussionTool.py:1.23
Yvo Schubbe
y.2005- at wcm-solutions.de
Sun Mar 20 15:35:01 EST 2005
Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv28184/CMFDefault
Modified Files:
DiscussionTool.py
Log Message:
simplified code a bit
=== Products/CMFDefault/DiscussionTool.py 1.22 => 1.23 ===
--- Products/CMFDefault/DiscussionTool.py:1.22 Wed Jan 19 08:43:36 2005
+++ Products/CMFDefault/DiscussionTool.py Sun Mar 20 15:35:01 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