Skip to content

Commit

Permalink
Fix bug with nested extensions.
Browse files Browse the repository at this point in the history
  • Loading branch information
joernweissenborn authored and jsnel committed Oct 15, 2023
1 parent 6b1b751 commit 1aa3d6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion glotaran/project/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, **data):
element = self.__root__[label]
assert element.extends is not None
extends = [self.__root__[label] for label in element.extends]
if all(not e.is_extended() for e in extends):
if all(e.label not in extended_elements for e in extends):
extends += [element]
self.__root__[label] = reduce(lambda a, b: a.extend(b), extends)
extended_elements.remove(label)
Expand Down
1 change: 1 addition & 0 deletions glotaran/project/test/test_scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"rates": {("s1", "s1"): "rates.4", ("s3", "s3"): "rates.3"},
"extends": ["parallel"],
},
"nested_extend": {"type": "kinetic", "extends": ["extended"], "rates": {}},
},
"experiments": {
"test_experiment": {
Expand Down

0 comments on commit 1aa3d6a

Please sign in to comment.