[CMF-checkins] CVS: CMF/DCWorkflow - DCWorkflow.py:1.18

Shane Hathaway shane@cvs.zope.org
Wed, 4 Sep 2002 19:32:07 -0400


Update of /cvs-repository/CMF/DCWorkflow
In directory cvs.zope.org:/tmp/cvs-serv20564

Modified Files:
	DCWorkflow.py 
Log Message:
If the workflow is set up incorrectly, the state can be None.  Avoid tripping
in updateRoleMappingsFor().  Collector #43.


=== CMF/DCWorkflow/DCWorkflow.py 1.17 => 1.18 ===
--- CMF/DCWorkflow/DCWorkflow.py:1.17	Tue Aug  6 09:28:29 2002
+++ CMF/DCWorkflow/DCWorkflow.py	Wed Sep  4 19:32:06 2002
@@ -400,7 +400,7 @@
         '''
         changed = 0
         sdef = self._getWorkflowStateOf(ob)
-        if self.permissions:
+        if sdef is not None and self.permissions:
             for p in self.permissions:
                 roles = []
                 if sdef.permission_roles is not None: