mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-04 03:41:56 +02:00
[core] Handle missing link nodes when deserializing edges
Avoid uncaught errors when deserializing edges in case linked nodes are missing. Handle missing nodes the same way missing attributes are dealt with.
This commit is contained in:
parent
87fbcee06d
commit
25094ac877
2 changed files with 17 additions and 2 deletions
|
@ -336,3 +336,15 @@ class TestImportGraphContentFromMinimalGraphData:
|
|||
assert len(graph.nodes) == 1
|
||||
assert len(graph.compatibilityNodes) == 0
|
||||
|
||||
def test_connectionsToMissingNodesAreDiscarded(self):
|
||||
graph = Graph("")
|
||||
|
||||
with registeredNodeTypes([SimpleNode]):
|
||||
sampleGraphContent = dedent("""
|
||||
{
|
||||
"SimpleNode_1": {
|
||||
"nodeType": "SimpleNode", "inputs": { "input": "{NotSerializedNode.output}" }
|
||||
}
|
||||
}
|
||||
""")
|
||||
graph._deserialize(json.loads(sampleGraphContent))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue