diff --git a/server/puzzle.py b/server/puzzle.py index 28fcbf051..9b67e5a68 100644 --- a/server/puzzle.py +++ b/server/puzzle.py @@ -135,7 +135,10 @@ async def puzzle_complete(request): users = request.app["users"] session = await aiohttp_session.get_session(request) - user = users[session.get("user_name")] + try: + user = users[session.get("user_name")] + except KeyError: + return web.json_response({}) if puzzleId in user.puzzles: return web.json_response({})