Skip to content

Commit

Permalink
SIMPLE-6084 Working around architectural issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tmikuska committed Nov 30, 2023
1 parent 80d0ff8 commit 5394bfe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion virl2_client/models/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,15 @@ def _set_configuration(self, value: str | list | dict | None) -> None:
"""
if self._configuration is None:
self._configuration = []
if value is None or isinstance(value, str):
if isinstance(value, str):
if self._configuration:
self._configuration[0]["content"] = value
else:
self._configuration.append({"name": "Main", "content": value})
return
if not value:
self._configuration = []
return
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 5394bfe

Please sign in to comment.