From 9af5572346cfa5fd81c7986bed2bea93a0640851 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Wed, 10 Jul 2024 12:19:12 +0200 Subject: [PATCH] fix: [backend:exercise] If restoration from backup failed, reset the state --- exercise.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exercise.py b/exercise.py index 68915f9..477a3cc 100644 --- a/exercise.py +++ b/exercise.py @@ -85,6 +85,10 @@ def restore_exercices_progress(): db.USER_ID_TO_AUTHKEY_MAPPING[int(user_id_str)] = authkey except: logger.info('Could not restore exercise progress') + db.EXERCISES_STATUS = {} + db.SELECTED_EXERCISES = [] + db.USER_ID_TO_EMAIL_MAPPING = {} + db.USER_ID_TO_AUTHKEY_MAPPING = {} def is_validate_exercises(exercises: list) -> bool: