fix: Loading the false scene by default

`get` was giving wrong result inthe  scene initialization routing during the  resolve process

Related to #100
This commit is contained in:
Swann
2020-07-17 14:47:52 +02:00
parent 0faf7d9436
commit 6201c82392

View File

@ -117,9 +117,10 @@ class BlDatablock(ReplicatedDatablock):
datablock_ref = utils.find_from_attr('uuid', self.uuid, datablock_root)
if not datablock_ref:
datablock_ref = datablock_root.get(
self.data['name'], # Resolve by name
self._construct(data=self.data)) # If it doesn't exist create it
try:
datablock_ref = datablock_root[self.data['name']]
except Exception:
datablock_ref = self._construct(data=self.data)
if datablock_ref:
setattr(datablock_ref, 'uuid', self.uuid)