Skip to content
Snippets Groups Projects
Commit 6e18fcee authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

BUG: don't include unset variables in all_variables

parent 2bba0afd
No related branches found
No related tags found
No related merge requests found
......@@ -48,10 +48,11 @@ class FileTree(object):
"""
All tree variables including those from the parent tree
"""
without_none = {key: value for key, value in self.variables.items() if value is not None}
if self.parent is None:
return dict(self.variables)
return without_none
res = self.parent.all_variables
res.update(self.variables)
res.update(without_none)
return res
def get_variable(self, name: str) -> str:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment