[CMF-checkins] CVS: CMF/DCWorkflow - DCWorkflow.py:1.17 Worklists.py:1.6

Florent Guillaume fg@nuxeo.com
Tue, 6 Aug 2002 09:28:31 -0400


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

Modified Files:
	DCWorkflow.py Worklists.py 
Log Message:
Corrected incorrect behavior when upgrading from older worklists.


=== CMF/DCWorkflow/DCWorkflow.py 1.16 => 1.17 ===
                 guard = qdef.guard
                 if guard is None or guard.check(sm, self, portal):
                     searchres = None
-                    if qdef.var_matches:
+                    var_match_keys = qdef.getVarMatchKeys()
+                    if var_match_keys:
                         # Check the catalog for items in the worklist.
                         catalog = getToolByName(self, 'portal_catalog')
                         dict = {}
-                        for k in qdef.var_matches.keys():
+                        for k in var_match_keys:
                             v = qdef.getVarMatch(k)
                             v_fmt = map(lambda x, info=info: x%info, v)
                             dict[k] = v_fmt


=== CMF/DCWorkflow/Worklists.py 1.5 => 1.6 ===
         res.sort()
         return res
 
+    def getVarMatchKeys(self):
+        if self.var_matches:
+            return self.var_matches.keys()
+        else:
+            return ()
+
     def getVarMatch(self, id):
         if self.var_matches:
             matches = self.var_matches.get(id, ())