From 916c0c6f692c8b24e151c54846c85b590c481961 Mon Sep 17 00:00:00 2001 From: Mawoka Date: Wed, 4 May 2022 20:09:31 +0200 Subject: [PATCH] :bug: Fixed wrong error-catching --- classquiz/routers/quiz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classquiz/routers/quiz.py b/classquiz/routers/quiz.py index 2c865e8..0237361 100644 --- a/classquiz/routers/quiz.py +++ b/classquiz/routers/quiz.py @@ -111,7 +111,7 @@ async def check_if_captcha_enabled(game_pin: str): return JSONResponse(status_code=404, content={"detail": "game not found"}) try: return CheckIfCaptchaEnabledResponse(**{"enabled": json.loads(game)["captcha_enabled"]}) - except KeyError or TypeError: + except (KeyError, TypeError): return CheckIfCaptchaEnabledResponse(**{"enabled": True})