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

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

parent f2bb67b4
...@@ -84,14 +84,13 @@ class Variable(IdAsReferenceMixin("variable_", "prefix"), XMLObject): ...@@ -84,14 +84,13 @@ class Variable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
self.getGroupList() is None and\ self.getGroupList() is None and\
self.getExpression() is None and\ self.getExpression() is None and\
self.info_guard is None: self.info_guard is None:
return None return Guard().__of__(self)
else: elif self.info_guard is None:
self.generateGuard() self.generateGuard()
return self.info_guard return self.info_guard
def generateInfoGuard(self): def generateInfoGuard(self):
if self.info_guard is None: self.info_guard = Guard()
self.info_guard = Guard().__of__(self)
if self.getRoleList() is not None: if self.getRoleList() is not None:
self.info_guard.roles = self.getRoleList() self.info_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