[CMF-checkins] CVS: CMF/CMFCore - TypesTool.py:1.51
runyaga
runyaga@thisbox.com
Mon, 14 Apr 2003 10:24:56 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv29164
Modified Files:
TypesTool.py
Log Message:
do not break if TypeInfo is suppose to filter
but no content_types are selected.
case: I have a portal_type that content is not suppose to be added to.
=== CMF/CMFCore/TypesTool.py 1.50 => 1.51 ===
--- CMF/CMFCore/TypesTool.py:1.50 Fri Mar 14 12:17:32 2003
+++ CMF/CMFCore/TypesTool.py Mon Apr 14 10:24:55 2003
@@ -179,6 +179,10 @@
if ti is None or ti.globalAllow():
return 1
+ #If a type is enabled to filter and no content_types are allowed
+ if not self.allowed_content_types:
+ return 0
+
if contentType in self.allowed_content_types:
return 1