mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 08:40:03 +02:00
adds dictionary support to state_manager (__update_attribute_by_path)
This commit is contained in:
parent
216368571a
commit
564eeeb433
@ -272,6 +272,9 @@ class StateManager:
|
|||||||
if attr_cache_type == "list":
|
if attr_cache_type == "list":
|
||||||
list_obj = get_object_attr_from_path(target_obj, attr_name)
|
list_obj = get_object_attr_from_path(target_obj, attr_name)
|
||||||
list_obj[index] = value
|
list_obj[index] = value
|
||||||
|
elif attr_cache_type == "dict":
|
||||||
|
dict_obj = get_object_attr_from_path(target_obj, attr_name)
|
||||||
|
dict_obj[index] = value
|
||||||
else:
|
else:
|
||||||
setattr(target_obj, attr_name, value)
|
setattr(target_obj, attr_name, value)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user