mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-05 12:21:59 +02:00
[core] fix: uid keys are integers
During the serialization to JSON, dict keys are converted to string. We need to convert them back to int.
This commit is contained in:
parent
cc6f75f2d4
commit
01874e52d3
1 changed files with 4 additions and 0 deletions
|
@ -1518,6 +1518,10 @@ class CompatibilityNode(BaseNode):
|
|||
self.outputs = self.nodeDict.get("outputs", {})
|
||||
self._internalFolder = self.nodeDict.get("internalFolder", "")
|
||||
self._uids = self.nodeDict.get("uids", {})
|
||||
# JSON enfore keys to be strings, see
|
||||
# https://docs.python.org/3.8/library/json.html#json.dump
|
||||
# We know our keys are integers, so we convert them back to int.
|
||||
self._uids = {int(k): v for k, v in self._uids.items()}
|
||||
|
||||
# restore parallelization settings
|
||||
self.parallelization = self.nodeDict.get("parallelization", {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue