mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 00:40:01 +02:00
fix. read-only attributes are not upated with values from json
This commit is contained in:
parent
3bf2bd23ca
commit
779a23b320
@ -141,6 +141,15 @@ class DataService(rpyc.Service, AbstractDataService):
|
|||||||
serialized_class, path=path, key="type"
|
serialized_class, path=path, key="type"
|
||||||
)
|
)
|
||||||
if class_value_type == value_type:
|
if class_value_type == value_type:
|
||||||
|
class_attr_is_read_only = get_nested_value_by_path_and_key(
|
||||||
|
serialized_class, path=path, key="readonly"
|
||||||
|
)
|
||||||
|
if class_attr_is_read_only:
|
||||||
|
logger.debug(
|
||||||
|
f'Attribute "{path}" is read-only. Ignoring value from JSON '
|
||||||
|
"file..."
|
||||||
|
)
|
||||||
|
continue
|
||||||
# Split the path into parts
|
# Split the path into parts
|
||||||
parts = path.split(".")
|
parts = path.split(".")
|
||||||
attr_name = parts[-1]
|
attr_name = parts[-1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user