From 6438a073055d690db8f91890b9fcf82d1eea0de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Mon, 23 Jun 2025 09:01:01 +0200 Subject: [PATCH] client: updates proxy._service_representation every time the client connects --- src/pydase/client/client.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pydase/client/client.py b/src/pydase/client/client.py index ec1b81d..2deb715 100644 --- a/src/pydase/client/client.py +++ b/src/pydase/client/client.py @@ -240,12 +240,11 @@ class Client: self.proxy, serialized_object=serialized_object ) serialized_object["type"] = "DeviceConnection" - if self.proxy._service_representation is not None: - # need to use object.__setattr__ to not trigger an observer notification - object.__setattr__(self.proxy, "_service_representation", serialized_object) + # need to use object.__setattr__ to not trigger an observer notification + object.__setattr__(self.proxy, "_service_representation", serialized_object) - if TYPE_CHECKING: - self.proxy._service_representation = serialized_object # type: ignore + if TYPE_CHECKING: + self.proxy._service_representation = serialized_object # type: ignore self.proxy._notify_changed("", self.proxy) self.proxy._connected = True