From bce00a7dd0d5a16ec4492bb099e72f8efaa36039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Palma?= Date: Sat, 1 Feb 2025 23:32:56 +0000 Subject: [PATCH] fix: professor federated login --- django/university/controllers/SigarraController.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/django/university/controllers/SigarraController.py b/django/university/controllers/SigarraController.py index d8168d6..7741134 100644 --- a/django/university/controllers/SigarraController.py +++ b/django/university/controllers/SigarraController.py @@ -68,7 +68,10 @@ def get_student_festid(self, nmec): if profile.status_code != 200: return None - courses = json.loads(profile.data)["cursos"] + try: + courses = json.loads(profile.data)["cursos"] + except json.decoder.JSONDecodeError: + return None return list(map(lambda course: { "fest_id": course["fest_id"],