Skip to content

Commit

Permalink
Merge pull request #202 from wiedehopf/patch
Browse files Browse the repository at this point in the history
list_get: when adding the default value, save to config
  • Loading branch information
dirkhh authored May 8, 2024
2 parents e6396d9 + 20809b3 commit 1773b3d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ def list_get(self, idx):
return self._value[idx]
if type(self._default) == list and len(self._default) == 1:
while len(self._value) <= idx:
print_err(f"{self._name}: appending default")
self._value.append(self._default[0])
print_err(f"{self._name} -> list_get({idx}) appended default {self._default[0]}, new len: {len(self._value)}")
self._reconcile(self._value)
return self._value[idx]

if type(self._default) != list:
Expand Down

0 comments on commit 1773b3d

Please sign in to comment.