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):
self.getGroupList() is None and\
self.getExpression() is None and\
self.info_guard is None:
return None
else:
return Guard().__of__(self)
elif self.info_guard is None:
self.generateGuard()
return self.info_guard
def generateInfoGuard(self):
if self.info_guard is None:
self.info_guard = Guard().__of__(self)
self.info_guard = Guard()
if self.getRoleList() is not None:
self.info_guard.roles = self.getRoleList()
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