fix adding 'root' key to format data

This commit is contained in:
Jakub Trllo 2022-03-01 15:32:46 +01:00
parent f66e653c24
commit ed526947eb

View file

@ -726,10 +726,11 @@ class AnatomyTemplates(TemplatesDict):
return output
def format(self, data, strict=True):
copy_data = copy.deepcopy(data)
roots = self.roots
if roots:
data["root"] = roots
result = super(AnatomyTemplates, self).format(data)
copy_data["root"] = roots
result = super(AnatomyTemplates, self).format(copy_data)
result.strict = strict
return result