From 7ed839d391bce492cfabbae7b15406405097a536 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Tue, 9 Jul 2024 14:05:00 +0200 Subject: [PATCH] fix: [backend:exercise] Gracefully catch user_id without emails --- exercise.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exercise.py b/exercise.py index 7288c03..de34964 100644 --- a/exercise.py +++ b/exercise.py @@ -322,6 +322,8 @@ def get_progress(): completion_for_users = get_completion_for_users() progress = {} for user_id in completion_for_users.keys(): + if user_id not in db.USER_ID_TO_EMAIL_MAPPING: + continue progress[user_id] = { 'email': db.USER_ID_TO_EMAIL_MAPPING[user_id], 'exercises': {},