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

fixup! WorkflowTool: py3

parent 9a2bacfd
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
# #
############################################################################## ##############################################################################
import six
from Products.ERP5Type.Workflow import WorkflowHistoryList as NewWorkflowHistoryList from Products.ERP5Type.Workflow import WorkflowHistoryList as NewWorkflowHistoryList
class WorkflowHistoryList(NewWorkflowHistoryList): class WorkflowHistoryList(NewWorkflowHistoryList):
...@@ -22,13 +23,16 @@ class WorkflowHistoryList(NewWorkflowHistoryList): ...@@ -22,13 +23,16 @@ class WorkflowHistoryList(NewWorkflowHistoryList):
def __getstate__(self): def __getstate__(self):
return self._prev, self._log return self._prev, self._log
def __nonzero__(self): def __bool__(self):
# not faster than __len__ but avoids migration # not faster than __len__ but avoids migration
if self._log: if self._log:
return True return True
assert self._prev is None assert self._prev is None
return False return False
if six.PY2:
__nonzero__ = __bool__
@property @property
def _rotate(self): def _rotate(self):
self._migrate() 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