Commit fc0b434b authored by Jérome Perrin's avatar Jérome Perrin Committed by Arnaud Fontaine

WorkflowTool: py3

parent 146956fe
......@@ -839,7 +839,7 @@ def generateNestedQuery(getQuery, priority_list, criterion_dict,
criterion_worklist_id_dict = worklist_id_dict.copy()
# Do not use iterkeys since the dictionary will be modified in the
# loop
for worklist_id in criterion_worklist_id_dict.keys():
for worklist_id in list(criterion_worklist_id_dict):
if worklist_id not in possible_worklist_id_dict:
del criterion_worklist_id_dict[worklist_id]
else:
......
......@@ -13,6 +13,7 @@
#
##############################################################################
import six
from Products.ERP5Type.Workflow import WorkflowHistoryList as NewWorkflowHistoryList
class WorkflowHistoryList(NewWorkflowHistoryList):
......@@ -22,13 +23,16 @@ class WorkflowHistoryList(NewWorkflowHistoryList):
def __getstate__(self):
return self._prev, self._log
def __nonzero__(self):
def __bool__(self):
# not faster than __len__ but avoids migration
if self._log:
return True
assert self._prev is None
return False
if six.PY2:
__nonzero__ = __bool__
@property
def _rotate(self):
self._migrate()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment