Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically updating a view with list content fails. #169

Open
jylind opened this issue Dec 3, 2024 · 0 comments
Open

Dynamically updating a view with list content fails. #169

jylind opened this issue Dec 3, 2024 · 0 comments

Comments

@jylind
Copy link

jylind commented Dec 3, 2024

With following configuration:

---
logging:
  console:
    modify: yes
    level: DEBUG
stagerunner:
  stages:
    - name: Initialize Run
      type: ConfigureStage
    - name: Workspace
      type: WsbStage
      arguments:
        name: Configs
...

original dump is:

logging:
    console:
        modify: yes
        level: DEBUG
stagerunner:
    stages: 
        [{name: Initialize Run, type: ConfigureStage},
         {name: Workspace, type: WsbStage, arguments: {name: Configs}}]

After dynamically updating values with following code:

dview = config["logging"]["console"]["level"]
dview.set("INFO")
lview = config["stagerunner"]["stages"][0]["name"]
lview.set("newname")

Changes the data into this:

logging:
    console:
        modify: yes
        level: INFO
stagerunner:
    stages:
        0:
            name: newname

The dict update works as expected but the list gets broken.
Reading values from inside of the lists works but not updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant