[CMF-checkins] CVS: CMF/CMFCore - PortalContent.py:1.32.2.2 TypesTool.py:1.26.2.3

Andrew Sawyers andrew@zope.com
Wed, 9 Jan 2002 14:43:34 -0500


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv18638/CMFCore

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

*Workflow notification has moved to the contstructInstance method 
on the TypesTool after the _setPortalTypeName method has been called
on the object rather then in manage_afterAdd.


=== CMF/CMFCore/PortalContent.py 1.32.2.1 => 1.32.2.2 ===
         #
         if aq_base(container) is not aq_base(self):
-            wf = getToolByName(self, 'portal_workflow', None)
-            if wf is not None:
-                wf.notifyCreated(self)
             self.indexObject()
 
     def manage_beforeDelete(self, item, container):


=== CMF/CMFCore/TypesTool.py 1.26.2.2 => 1.26.2.3 ===
 from Globals import InitializeClass, DTMLFile
 from utils import UniqueObject, SimpleItemWithProperties, tuplize
-from utils import _dtmldir, _checkPermission, cookString
+from utils import _dtmldir, _checkPermission, cookString, getToolByName
 import string
 import urllib
 from AccessControl import getSecurityManager, ClassSecurityInfo
@@ -448,7 +448,9 @@
 
         if hasattr(ob, '_setPortalTypeName'):
             ob._setPortalTypeName(self.getId())
-
+        wf = getToolByName(ob, 'portal_workflow', None)
+        if wf is not None:
+            wf.notifyCreated(ob)
         return ob
 
 InitializeClass( FactoryTypeInformation )