Quick definition of an optional parameter variable #24
1 changed files with 7 additions and 3 deletions
|
@ -478,9 +478,13 @@ class Variable(Common):
|
||||||
keys["default"] = self.populate_calculation(self.elt.default)
|
keys["default"] = self.populate_calculation(self.elt.default)
|
||||||
except VariableCalculationDependencyError:
|
except VariableCalculationDependencyError:
|
||||||
pass
|
pass
|
||||||
for attribute in ['frozen', 'hidden', "mandatory", "disabled"]:
|
for attribute in ["frozen", "hidden", "mandatory", "disabled"]:
|
||||||
if hasattr(self.elt, attribute):
|
if hasattr(self.elt, attribute): # FIXME FIXME and attribute == "optional":
|
||||||
raise DictConsistencyError(f"Sub-attributes not allowed in a '{attribute}' attribute", 100, self.elt.xmlfiles)
|
raise DictConsistencyError(
|
||||||
|
f"Sub-attributes not allowed in a '{attribute}' attribute",
|
||||||
|
100,
|
||||||
|
self.elt.xmlfiles,
|
||||||
|
)
|
||||||
if self.elt.path in self.objectspace.default_multi:
|
if self.elt.path in self.objectspace.default_multi:
|
||||||
try:
|
try:
|
||||||
keys["default_multi"] = self.populate_calculation(
|
keys["default_multi"] = self.populate_calculation(
|
||||||
|
|
Loading…
Reference in a new issue