Commit da590609 authored by Jérome Perrin's avatar Jérome Perrin

fixup! WorkflowTool: py3

parent 9a2bacfd
Pipeline #33816 failed with stage
in 0 seconds
......@@ -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