mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 08:40:03 +02:00
observer: first check if full access path contains private or protected attributes
As protected and private attributes are not stored in the cache, it does not make sense to compare the cached value against the new value.
This commit is contained in:
parent
218dab1ade
commit
cddb83451a
@ -37,8 +37,9 @@ class DataServiceObserver(PropertyObserver):
|
|||||||
)
|
)
|
||||||
|
|
||||||
cached_value = cached_value_dict.get("value")
|
cached_value = cached_value_dict.get("value")
|
||||||
if cached_value != dump(value)["value"] and all(
|
if (
|
||||||
part[0] != "_" for part in full_access_path.split(".")
|
all(part[0] != "_" for part in full_access_path.split("."))
|
||||||
|
and cached_value != dump(value)["value"]
|
||||||
):
|
):
|
||||||
logger.debug("'%s' changed to '%s'", full_access_path, value)
|
logger.debug("'%s' changed to '%s'", full_access_path, value)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user