Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
model.submodel: add elements to
SubmodelElementList
after the `_val…
…ue` attribute has been assigned This fixes an `AttributeError` previously raised during initialization of a `SubmodelElementList`, since the `check_constraints` function, which is called for every added item, may call `Referable.__repr__()` when the `value` attribute isn't set yet. The `AttributeError` occured because `Referable.__repr__()` accesses the `value` attribute for direct children of a `SubmodelElementList` (1aa0e82). This is worked around by first assigning the `OrderedNamespaceSet` to the `value`-attribute and then adding each item separately.
- Loading branch information