mirror of
https://github.com/tiqi-group/pydase.git
synced 2026-01-16 00:49:26 +01: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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user