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

State.py: robustness improvement; in some rare cases, DC workflow may have...

State.py: robustness improvement; in some rare cases, DC workflow may have non-exist but defined as possible transitions. this improvement can avoid these error crush workflow conversion.
parent 745dfed1
......@@ -67,10 +67,11 @@ class State(IdAsReferenceMixin("state_", "prefix"), XMLObject, XMLMatrix):
def addPossibleTransition(self, tr_ref):
possible_transition_list = self.getCategoryList()
transition = self.getParent()._getOb('transition_'+tr_ref)
tr_path = 'destination/' + '/'.join(transition.getPath().split('/')[2:])
possible_transition_list.append(tr_path)
self.setCategoryList(possible_transition_list)
transition = self.getParent()._getOb('transition_'+tr_ref, None)
if transition is not None:
tr_path = 'destination/' + '/'.join(transition.getPath().split('/')[2:])
possible_transition_list.append(tr_path)
self.setCategoryList(possible_transition_list)
def setPermission(self, permission, acquired, roles, REQUEST=None):
"""Set a permission for this State."""
......
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