From 7ac14facc3e013615aa6b79f2dd98d94b0b7547d Mon Sep 17 00:00:00 2001 From: Mawoka Date: Fri, 17 Feb 2023 12:19:49 +0100 Subject: [PATCH] :ambulance: Catching bug in save-quiz --- classquiz/socket_server/export_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classquiz/socket_server/export_helpers.py b/classquiz/socket_server/export_helpers.py index 75c4743..39f12fe 100644 --- a/classquiz/socket_server/export_helpers.py +++ b/classquiz/socket_server/export_helpers.py @@ -18,7 +18,7 @@ async def save_quiz_to_storage(game_pin: str): redis_res = await redis.get(f"game_session:{game_pin}:{i}") try: answers.append(json.loads(redis_res)) - except ValidationError: + except (ValidationError, TypeError): answers.append([]) player_scores = await redis.hgetall(f"game_session:{game_pin}:player_scores") custom_field_data = await redis.hgetall(f"game:{game_pin}:players:custom_fields")