From 1b2573d1301cd416ae0a0e400724871802baaf56 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 15 Dec 2021 23:29:18 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20calcul=20cube=20sans=20les=20d=C3=A9miss?= =?UTF-8?q?ionnaires.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/comp/inscr_mod.py | 4 ++-- app/comp/moy_mod.py | 2 +- sco_version.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/comp/inscr_mod.py b/app/comp/inscr_mod.py index 4d9a573bb..c34547e6b 100644 --- a/app/comp/inscr_mod.py +++ b/app/comp/inscr_mod.py @@ -22,7 +22,7 @@ def df_load_modimpl_inscr(formsemestre) -> pd.DataFrame: """ # méthode la moins lente: une requete par module, merge les dataframes moduleimpl_ids = [m.id for m in formsemestre.modimpls] - etudids = [i.etudid for i in formsemestre.get_inscrits()] + etudids = [i.etudid for i in formsemestre.get_inscrits(include_dem=False)] df = pd.DataFrame(index=etudids, dtype=int) for moduleimpl_id in moduleimpl_ids: ins_df = pd.read_sql_query( @@ -34,7 +34,7 @@ def df_load_modimpl_inscr(formsemestre) -> pd.DataFrame: index_col="etudid", dtype=int, ) - df = df.merge(ins_df, how="outer", left_index=True, right_index=True) + df = df.merge(ins_df, how="left", left_index=True, right_index=True) # les colonnes de df sont en float (Nan) quand il n'y a # aucun inscrit au module. df.fillna(0, inplace=True) # les non-inscrits diff --git a/app/comp/moy_mod.py b/app/comp/moy_mod.py index ea34ecb07..851958169 100644 --- a/app/comp/moy_mod.py +++ b/app/comp/moy_mod.py @@ -150,7 +150,7 @@ def df_load_modimpl_notes(moduleimpl_id: int) -> tuple: # Ce merge met à NULL les élements non présents # (notes non saisies ou etuds non inscrits au module): evals_notes = evals_notes.merge( - eval_df, how="outer", left_index=True, right_index=True + eval_df, how="left", left_index=True, right_index=True ) # Force columns names to integers (evaluation ids) evals_notes.columns = pd.Int64Index( diff --git a/sco_version.py b/sco_version.py index 6e341a849..1616139e1 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.1.6" +SCOVERSION = "9.1.7" SCONAME = "ScoDoc"