mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
implemented setitem for PublishAttributes
This commit is contained in:
parent
67db8e7632
commit
6116a27677
1 changed files with 14 additions and 0 deletions
|
|
@ -290,6 +290,20 @@ class PublishAttributes:
|
|||
def __getitem__(self, key):
|
||||
return self._data[key]
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
"""Set value for plugin.
|
||||
|
||||
Args:
|
||||
key (str): Plugin name.
|
||||
value (dict[str, Any]): Value to set.
|
||||
|
||||
"""
|
||||
current_value = self._data.get(key)
|
||||
if isinstance(current_value, PublishAttributeValues):
|
||||
current_value.set_value(value)
|
||||
else:
|
||||
self._data[key] = value
|
||||
|
||||
def __contains__(self, key):
|
||||
return key in self._data
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue