Skip to content

Dynamic GitTree #484

Apr 1, 2024 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

So the issue you ran into is because you are mutating a state variable in a way that the shared state was not able to detect. A way to handle it without replacing the state variable is to call dirty like stated in the How to start - forcing state exchange.

In other words, you could also have done

def add_pipeline_node():
    state.pipeline_nodes.append({"id": "2", "parent": "1", "visible": 1, "name": "Contour"})
    state.dirty("pipeline_nodes")

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jourdain
Comment options

Answer selected by peterjwilson
@peterjwilson
Comment options

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