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

Transition.py: fix guard creation condiction to avoid guard conflict.

parent c514befe
...@@ -93,14 +93,13 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject): ...@@ -93,14 +93,13 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject):
self.getGroupList() is None and\ self.getGroupList() is None and\
self.getExpression() is None and\ self.getExpression() is None and\
self.guard is None: self.guard is None:
return None return Guard().__of__(self)
else: elif self.guard is None:
self.generateGuard() self.generateGuard()
return self.guard return self.guard
def generateGuard(self): def generateGuard(self):
if self.guard is None: self.guard = Guard()
self.guard = Guard().__of__(self)
if self.getRoleList() is not None: if self.getRoleList() is not None:
self.guard.roles = self.getRoleList() self.guard.roles = self.getRoleList()
if self.getPermissionList() is not None: if self.getPermissionList() is not None:
......
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