Skip to content
Snippets Groups Projects
Commit 8e0150df authored by Ladislav Lhotka's avatar Ladislav Lhotka
Browse files

Make Instance.add_defaults work also for empty lists.

parent 3e344b74
No related branches found
No related tags found
No related merge requests found
......@@ -250,6 +250,9 @@ class InstanceNode:
if isinstance(self.value, ArrayValue) and isinstance(sn, ListNode):
try:
inst = self.entry(0)
except NonexistentInstance:
return self
try:
while True:
ninst = inst.add_defaults()
inst = ninst.next()
......
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