From 1940e14adbf0ade093d386b0978ed0785060a49b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20=C3=85strand?= <112588563+benjaminastrand@users.noreply.github.com> Date: Tue, 3 Dec 2024 17:58:40 +0100 Subject: [PATCH] Bugfix/SK-1242 | Handle successful creation of session (#767) --- fedn/network/api/client.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fedn/network/api/client.py b/fedn/network/api/client.py index aca36cbdc..344ae6453 100644 --- a/fedn/network/api/client.py +++ b/fedn/network/api/client.py @@ -645,10 +645,9 @@ def start_session( headers=self.headers, ) - if id is None: - id = response.json()["session_id"] - if response.status_code == 201: + if id is None: + id = response.json()["session_id"] response = requests.post( self._get_url_api_v1("sessions/start"), json={