Skip to content

Commit

Permalink
SIMPLE-5806 fix for a missed bug (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-valent committed Oct 25, 2023
1 parent d595f7e commit ab259d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virl2_client/models/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,14 +431,14 @@ def configuration(self, value: str | list | dict) -> None:
:param value: The configuration data in one of three formats.
"""
self._set_node_property("configuration", value)
if self._configuration is None:
self._configuration = []
if isinstance(value, str):
if not self._configuration:
self._configuration.append({"name": "Main", "content": value})
else:
self._configuration[0]["content"] = value
return
if self._configuration is None:
self._configuration = []
new_configs = value if isinstance(value, list) else [value]
new_configs_by_name = {
new_config["name"]: new_config for new_config in new_configs
Expand Down

0 comments on commit ab259d4

Please sign in to comment.