Skip to content
Snippets Groups Projects
Commit 34edfae0 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

BF: Ensure that data structure returned by query.variables method cannot

mutate canonical version
parent 19571ee6
No related branches found
No related tags found
No related merge requests found
...@@ -132,10 +132,10 @@ class FileTreeQuery(object): ...@@ -132,10 +132,10 @@ class FileTreeQuery(object):
files of that ``short_name`` type are returned. files of that ``short_name`` type are returned.
""" """
if short_name is None: if short_name is None:
return dict(self.__allvars) return {var : list(vals) for var, vals in self.__allvars.items()}
else: else:
varnames = self.__shortnamevars[short_name] varnames = self.__shortnamevars[short_name]
return {var : self.__allvars[var] for var in varnames} return {var : list(self.__allvars[var]) for var in varnames}
@property @property
......
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