From 03c197786fbcb9ac008f0b84095fe393340bf382 Mon Sep 17 00:00:00 2001 From: Eliot Date: Tue, 21 Jan 2025 11:30:15 +0100 Subject: [PATCH] fix(backend): microsoft session deletion not updates on scrapers --- app/api/routes/scrapers_routes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/api/routes/scrapers_routes.py b/app/api/routes/scrapers_routes.py index fe3c453..8785eab 100644 --- a/app/api/routes/scrapers_routes.py +++ b/app/api/routes/scrapers_routes.py @@ -31,6 +31,10 @@ def get_publicscraper_config(): res = [] for student in students: + if not student.microsoft_session: + student.public_scraper_id = None + StudentService.update_student(student) + continue res.append({ "microsoft_session": decrypt_token(student.microsoft_session), "tekbetter_token": student.scraper_token,