Skip to content

Commit

Permalink
B: Still save nodetree as json when no import because non-sideeffected
Browse files Browse the repository at this point in the history
  • Loading branch information
dzil123 committed Nov 28, 2019
1 parent f5bd790 commit 327a383
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion opsi/webserver/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ def _remove_unneeded_nodes(program, nodetree: NodeTreeN):

# Finally, remove those nodes that weren't visited
nodes = [node for node in nodetree.nodes if node.id in visited]
nodetree.nodes = nodes

# make a copy of nodetree to fix broken json save
nodetree = NodeTreeN(nodes=nodes)

return nodetree

Expand Down

0 comments on commit 327a383

Please sign in to comment.