From 546e10c83a333cd215a103d72e5e12d1d1cc5ff2 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 28 Feb 2022 15:07:48 +0100 Subject: [PATCH] Finalise calcul moy. gen. indicative BUT --- app/comp/res_but.py | 2 +- app/comp/res_common.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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