From 7afca61d3d1fe817b352b3a1f105b61972297671 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 12 Feb 2022 10:31:52 +0100 Subject: [PATCH] Fix: bug Mulhouse --- app/comp/res_common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/comp/res_common.py b/app/comp/res_common.py index b53c942f..fb064f48 100644 --- a/app/comp/res_common.py +++ b/app/comp/res_common.py @@ -215,10 +215,6 @@ class ResultatsSemestre(ResultatsCache): """L'état de l'UE pour cet étudiant. Result: dict, ou None si l'UE n'est pas dans ce semestre. """ - if not ue_id in self.etud_moy_ue: - return None - if not self.validations: - self.validations = res_sem.load_formsemestre_validations(self.formsemestre) ue = UniteEns.query.get(ue_id) # TODO cacher nos UEs ? if ue.type == UE_SPORT: return { @@ -233,6 +229,10 @@ class ResultatsSemestre(ResultatsCache): "capitalized_ue_id": None, "ects_pot": 0.0, } + if not ue_id in self.etud_moy_ue: + return None + if not self.validations: + self.validations = res_sem.load_formsemestre_validations(self.formsemestre) cur_moy_ue = self.etud_moy_ue[ue_id][etudid] moy_ue = cur_moy_ue is_capitalized = False