From 780a2466d3e787883a7681483fe2a488bdfb30cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Wed, 27 Mar 2024 16:18:04 +0100 Subject: [PATCH] fixes updating a value through sio client --- src/pydase/server/web_server/sio_setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pydase/server/web_server/sio_setup.py b/src/pydase/server/web_server/sio_setup.py index 9047ce1..660c962 100644 --- a/src/pydase/server/web_server/sio_setup.py +++ b/src/pydase/server/web_server/sio_setup.py @@ -22,10 +22,13 @@ class UpdateDict(TypedDict): Attributes: ---------- + access_path : string + The full access path of the attribute to be updated. value : SerializedObject The serialized new value to be assigned to the attribute. """ + access_path: str value: SerializedObject @@ -124,7 +127,7 @@ def setup_sio_events(sio: socketio.AsyncServer, state_manager: StateManager) -> @sio.event async def update_value(sid: str, data: UpdateDict) -> None: - path = data["value"]["full_access_path"] + path = data["access_path"] # this should probably happen within the following function call -> can also # look at the current type of the attribute at "path"