Skip to content

Dynamically updating a view with list content fails. #169

Open
@jylind

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions