mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 00:38:41 +02:00
[core] fix: filter attributes after the node upgrade
Values from removed attributes may be used in the node's upgrade code.
This commit is contained in:
parent
45bed69672
commit
290e0278e9
1 changed files with 4 additions and 1 deletions
|
@ -1369,7 +1369,8 @@ class CompatibilityNode(BaseNode):
|
|||
commonInputs.append(attrName)
|
||||
|
||||
node = Node(self.nodeType, position=self.position)
|
||||
attrValues = {key: value for key, value in self.inputs.items() if key in commonInputs}
|
||||
# convert attributes from a list of tuples into a dict
|
||||
attrValues = {key: value for (key, value) in self.inputs.items()}
|
||||
|
||||
# Use upgrade method of the node description itself if available
|
||||
try:
|
||||
|
@ -1382,6 +1383,8 @@ class CompatibilityNode(BaseNode):
|
|||
logging.error("Error in the upgrade implementation of the node: {}. The return type is incorrect.".format(self.name))
|
||||
upgradedAttrValues = attrValues
|
||||
|
||||
upgradedAttrValuesTmp = {key: value for (key, value) in upgradedAttrValues.items() if key in commonInputs}
|
||||
|
||||
node.upgradeAttributeValues(upgradedAttrValues)
|
||||
return node
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue