From 5d6238de11715511cebbbe097e64d4937b011453 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 26 Mar 2024 19:09:56 +0100 Subject: [PATCH] fix python client set_user_state --- python-client/wmill/wmill/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-client/wmill/wmill/client.py b/python-client/wmill/wmill/client.py index 8b64739ca4..61eb3a6196 100644 --- a/python-client/wmill/wmill/client.py +++ b/python-client/wmill/wmill/client.py @@ -349,7 +349,7 @@ class Windmill: def set_flow_user_state(self, key: str, value: Any) -> None: """Set the user state of a flow at a given key""" flow_id = self.get_root_job_id() - r = client.post(f"/w/{self.workspace}/jobs/flow/user_states/{flow_id}/{key}", json=value, raise_for_status=False) + r = self.post(f"/w/{self.workspace}/jobs/flow/user_states/{flow_id}/{key}", json=value, raise_for_status=False) if r.status_code == 404: print(f"Job {flow_id} does not exist or is not a flow") @@ -357,7 +357,7 @@ class Windmill: def get_flow_user_state(self, key: str) -> Any: """Get the user state of a flow at a given key""" flow_id = self.get_root_job_id() - r = client.get(f"/w/{self.workspace}/jobs/flow/user_states/{flow_id}/{key}", raise_for_status=False) + r = self.get(f"/w/{self.workspace}/jobs/flow/user_states/{flow_id}/{key}", raise_for_status=False) if r.status_code == 404: print(f"Job {flow_id} does not exist or is not a flow") return None