confuse icon indicating copy to clipboard operation
confuse copied to clipboard

Dynamically updating a view with list content fails.

Open jylind opened this issue 1 year ago • 0 comments

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.

jylind avatar Dec 03 '24 07:12 jylind