[graph] add GraphModification inside upgradeNode method

This commit is contained in:
Yann Lanthony 2018-07-20 15:35:55 +02:00
parent f5820b3eb1
commit 3417f58335

View file

@ -429,6 +429,7 @@ class Graph(BaseObject):
if not isinstance(node, CompatibilityNode):
raise ValueError("Upgrade is only available on CompatibilityNode instances.")
upgradedNode = node.upgrade()
with GraphModification(self):
inEdges, outEdges = self.removeNode(nodeName)
self.addNode(upgradedNode, nodeName)
for dst, src in outEdges.items():