mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
auto create new item on getitem in mutable dict
This commit is contained in:
parent
26a4c68af8
commit
fc103ec5c3
1 changed files with 2 additions and 0 deletions
|
|
@ -44,6 +44,8 @@ class DictMutableKeysEntity(EndpointEntity):
|
|||
_miss_arg = object()
|
||||
|
||||
def __getitem__(self, key):
|
||||
if key not in self.children_by_key:
|
||||
self.add_key(key)
|
||||
return self.children_by_key[key]
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue