[CMF-checkins] CVS: CMF - TypesTool.py:1.5.2.2

tseaver@digicool.com tseaver@digicool.com
Wed, 11 Apr 2001 18:04:00 -0400 (EDT)


Update of /cvs-repository/CMF/CMFCore
In directory korak:/tmp/cvs-serv3607/CMFCore

Modified Files:
      Tag: CMF-1_0-branch
	TypesTool.py 
Log Message:


 - Extend TypesTool to deal appropriately with DTML factory methods
   (e.g., for ZClasses).



--- Updated File TypesTool.py in package CMF --
--- TypesTool.py	2001/04/07 20:19:31	1.5.2.1
+++ TypesTool.py	2001/04/11 22:03:58	1.5.2.2
@@ -470,7 +470,11 @@
         if m is None:
             raise 'Unauthorized', ('Cannot create %s' % self.id)
         id = str(id)
-        apply(m, (id,) + args, kw)
+        if getattr( m, 'isDocTemp', 0 ):
+            kw[ 'id' ] = id
+            apply( m, ( m.aq_parent, self.REQUEST ) + args, kw )
+        else:
+            apply(m, (id,) + args, kw)
         ob = container._getOb(id)
         if hasattr(ob, '_setPortalTypeName'):
             ob._setPortalTypeName(self.id)