diff --git a/app/comp/res_but.py b/app/comp/res_but.py index f4cdda8ab..20e63cba0 100644 --- a/app/comp/res_but.py +++ b/app/comp/res_but.py @@ -108,7 +108,7 @@ class ResultatsSemestreBUT(NotesTableCompat): # ) self.etud_moy_gen = moy_sem.compute_sem_moys_apc_using_ects( self.etud_moy_ue, - [ue.ects for ue in self.ues], + [ue.ects for ue in self.ues if ue.type != UE_SPORT], formation_id=self.formsemestre.formation_id, ) # --- UE capitalisées diff --git a/app/comp/res_common.py b/app/comp/res_common.py index 7d2eb5ae3..8fa106f50 100644 --- a/app/comp/res_common.py +++ b/app/comp/res_common.py @@ -195,7 +195,7 @@ class ResultatsSemestre(ResultatsCache): if ue_cap["is_capitalized"]: recompute_mg = True coef = ue_cap["coef_ue"] - if not np.isnan(ue_cap["moy"]): + if not np.isnan(ue_cap["moy"]) and coef: sum_notes_ue += ue_cap["moy"] * coef sum_coefs_ue += coef