[Checkins] SVN: Products.CMFCore/branches/2.1/Products/CMFCore/ - WorkflowTool: Passing the "magic" chain name "(Default)" to the

Jens Vagelpohl jens at dataflake.org
Sat Sep 13 14:05:21 EDT 2008


Log message for revision 91121:
  - WorkflowTool: Passing the "magic" chain name "(Default)" to the
    setChainForPortalTypes method did not set the chain to the default
    chain value as expected.
    (https://bugs.launchpad.net/zope-cmf/+bug/161702)
  

Changed:
  U   Products.CMFCore/branches/2.1/Products/CMFCore/CHANGES.txt
  U   Products.CMFCore/branches/2.1/Products/CMFCore/WorkflowTool.py
  U   Products.CMFCore/branches/2.1/Products/CMFCore/tests/test_WorkflowTool.py

-=-
Modified: Products.CMFCore/branches/2.1/Products/CMFCore/CHANGES.txt
===================================================================
--- Products.CMFCore/branches/2.1/Products/CMFCore/CHANGES.txt	2008-09-13 18:01:52 UTC (rev 91120)
+++ Products.CMFCore/branches/2.1/Products/CMFCore/CHANGES.txt	2008-09-13 18:05:21 UTC (rev 91121)
@@ -4,7 +4,12 @@
 2.1.3-beta (unreleased)
 -----------------------
 
+- WorkflowTool: Passing the "magic" chain name "(Default)" to the
+  setChainForPortalTypes method did not set the chain to the default 
+  chain value as expected.
+  (https://bugs.launchpad.net/zope-cmf/+bug/161702)
 
+
 2.1.2 (2008-09-13)
 ------------------
 

Modified: Products.CMFCore/branches/2.1/Products/CMFCore/WorkflowTool.py
===================================================================
--- Products.CMFCore/branches/2.1/Products/CMFCore/WorkflowTool.py	2008-09-13 18:01:52 UTC (rev 91120)
+++ Products.CMFCore/branches/2.1/Products/CMFCore/WorkflowTool.py	2008-09-13 18:05:21 UTC (rev 91121)
@@ -392,7 +392,7 @@
 
         if isinstance(chain, basestring):
             if chain == '(Default)':
-                chain = ''
+                chain = self.getDefaultChain()
             else:
                 chain = [ wf.strip() for wf in chain.split(',') if wf.strip() ]
 

Modified: Products.CMFCore/branches/2.1/Products/CMFCore/tests/test_WorkflowTool.py
===================================================================
--- Products.CMFCore/branches/2.1/Products/CMFCore/tests/test_WorkflowTool.py	2008-09-13 18:01:52 UTC (rev 91120)
+++ Products.CMFCore/branches/2.1/Products/CMFCore/tests/test_WorkflowTool.py	2008-09-13 18:05:21 UTC (rev 91121)
@@ -309,9 +309,9 @@
         self.assertEquals( tool.getChainFor(dummy), ('b', 'a') )
 
         # Using the '(Default)' keyword
-        # http://www.zope.org/Collectors/CMF/475
+        # https://bugs.launchpad.net/zope-cmf/+bug/161702
         tool.setChainForPortalTypes( ('Dummy Content',), '(Default)' )
-        self.assertEquals( tool.getChainFor(dummy), () )
+        self.assertEquals( tool.getDefaultChain(), tool.getChainFor( dummy ) )
 
     def test_getCatalogVariablesFor( self ):
 



More information about the Checkins mailing list