[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/workflow/instance.py Oops, forgot to run tests after last change. Fixed code to fix test.

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Aug 16 20:01:22 EDT 2004


Log message for revision 27159:
  Oops, forgot to run tests after last change. Fixed code to fix test.
  


Changed:
  U   Zope3/trunk/src/zope/app/workflow/instance.py


-=-
Modified: Zope3/trunk/src/zope/app/workflow/instance.py
===================================================================
--- Zope3/trunk/src/zope/app/workflow/instance.py	2004-08-16 23:55:19 UTC (rev 27158)
+++ Zope3/trunk/src/zope/app/workflow/instance.py	2004-08-17 00:01:22 UTC (rev 27159)
@@ -21,6 +21,7 @@
 
 from zope.app import zapi
 from zope.app.annotation.interfaces import IAnnotatable, IAnnotations
+from zope.app.container.interfaces import IContained
 from zope.app.servicenames import Utilities
 from zope.app.workflow.interfaces import IProcessInstance, IProcessDefinition
 from zope.app.workflow.interfaces import IProcessInstanceContainer
@@ -115,7 +116,8 @@
         # added to any message board yet;
         setitem(self, self.wfdata.__setitem__, key, object)
         # Set the final parent to be the message.
-        object.__parent__ = self.context
+        if IContained.providedBy(object):
+            object.__parent__ = self.context
 
     def __delitem__(self, key):
         "See IZopeWriteContainer"



More information about the Zope3-Checkins mailing list