From 02647762a305b82a0a555d44cfe57ceeddbe6ac5 Mon Sep 17 00:00:00 2001 From: Jonathan Pyle Date: Tue, 1 Oct 2024 22:13:27 -0400 Subject: [PATCH] fix bug in DAList initializeObject --- CHANGELOG.md | 6 ++++++ docassemble_base/docassemble/base/util.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1591b738c..b9890a44c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [1.5.13] - 2024-10-01 + +### Fixed +- Issue with `object_checkboxes` and `object_multiselect` when used as + elements in a `DAList`. + ## [1.5.12] - 2024-09-30 ### Changed diff --git a/docassemble_base/docassemble/base/util.py b/docassemble_base/docassemble/base/util.py index 02b4a21f0..8c52ac1e0 100644 --- a/docassemble_base/docassemble/base/util.py +++ b/docassemble_base/docassemble/base/util.py @@ -1861,7 +1861,7 @@ def initializeObject(self, *pargs, **kwargs): for key, val in kwargs.items(): new_obj_parameters[key] = val newobject = objectFunction(self.instanceName + '[' + repr(index) + ']', *pargs, **new_obj_parameters) - for pre_index in range(index): # pylint: disable=unused-variable + for pre_index in range(len(self.elements), index): # pylint: disable=unused-variable self.elements.append(None) self[index] = newobject self.there_are_any = True