Commit c6506bea authored by wenjie.zheng's avatar wenjie.zheng

Workflow.py: accept None guard, but only for debugging.

parent 76dd0a7f
...@@ -204,7 +204,9 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject): ...@@ -204,7 +204,9 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
def _checkTransitionGuard(self, tdef, document, **kw): def _checkTransitionGuard(self, tdef, document, **kw):
guard = tdef.getGuard() guard = tdef.getGuard()
if guard is None: if guard is None:
return 0 # in new workflow transition, guard shouldn't be none any more, this
# condiction is only kept for debugging.
return 1
if guard.check(getSecurityManager(), self, document, **kw): if guard.check(getSecurityManager(), self, document, **kw):
return 1 return 1
return 0 return 0
......
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