From bf70afdc69671c58c2769e7bec18b4b97f6bdd14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Schr=C3=B6der?= <fschroeder@techfak.uni-bielefeld.de> Date: Mon, 25 Mar 2024 16:30:13 +0100 Subject: [PATCH] Handle None client in game connection request The update modifies the get_participant_game_connection method in the study server. Now, the method uses "Test" as the default host if the request client is None. This ensures that the functionality will not break when dealing with test or invalid client requests. --- cooperative_cuisine/study_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cooperative_cuisine/study_server.py b/cooperative_cuisine/study_server.py index d20a46c9..7988acf5 100644 --- a/cooperative_cuisine/study_server.py +++ b/cooperative_cuisine/study_server.py @@ -654,7 +654,7 @@ async def get_game_connection( """ player_info, level_info = study_manager.get_participant_game_connection( - participant_id, request.client.host + participant_id, request.client.host if request.client is not None else "Test" ) return {"player_info": player_info, "level_info": level_info} -- GitLab