mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-04 04:40:39 +02:00
fixes update of cache when the type has changed
When an attribute changes from, say, a quantity to an enumeration, the enum key in the serialization was not added to the cache, and thus the frontend was not able to render the enum.
This commit is contained in:
parent
36c863e845
commit
f2cf0d9c1a
@ -269,12 +269,11 @@ def set_nested_value_by_path(
|
||||
|
||||
# setting the new value
|
||||
serialized_value = dump(value)
|
||||
if "readonly" in current_dict:
|
||||
if current_dict["type"] != "method":
|
||||
current_dict["type"] = serialized_value["type"]
|
||||
current_dict["value"] = serialized_value["value"]
|
||||
else:
|
||||
current_dict.update(serialized_value)
|
||||
serialized_value.pop("readonly", None)
|
||||
value_type = serialized_value.pop("type")
|
||||
if "readonly" in current_dict and current_dict["type"] != "method":
|
||||
current_dict["type"] = value_type
|
||||
current_dict.update(serialized_value)
|
||||
|
||||
|
||||
def get_nested_dict_by_path(
|
||||
|
Loading…
x
Reference in New Issue
Block a user