Commit 041a18a2 authored by wenjie.zheng's avatar wenjie.zheng

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

parent d871f033
...@@ -89,14 +89,13 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject): ...@@ -89,14 +89,13 @@ class Worklist(IdAsReferenceMixin("worklist_", "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