From 0d97d5bfc6c24e76b5ad7b0039e1a345fc0bf15d Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 31 Jan 2022 22:46:18 +0100 Subject: [PATCH] Gestion erreur si lancement des calculs avec... 0 UEs --- app/comp/moy_mod.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/comp/moy_mod.py b/app/comp/moy_mod.py index bf4afe7a0..f79982f7c 100644 --- a/app/comp/moy_mod.py +++ b/app/comp/moy_mod.py @@ -233,6 +233,8 @@ class ModuleImplResultsAPC(ModuleImplResults): assert evals_poids_df.shape[0] == nb_evals # compat notes/poids if nb_etuds == 0: return pd.DataFrame(index=[], columns=evals_poids_df.columns) + if nb_ues == 0: + return pd.DataFrame(index=self.evals_notes.index, columns=[]) evals_coefs = self.get_evaluations_coefs(moduleimpl) evals_poids = evals_poids_df.values * evals_coefs # -> evals_poids shape : (nb_evals, nb_ues)