From 7f786faa2d51812cd739f72f1257788aafbf6e5c Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 7 Nov 2022 18:47:25 +0100 Subject: [PATCH] Calcul moyenne LP UE stages&projets: bug fix #388 --- app/scodoc/sco_codes_parcours.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scodoc/sco_codes_parcours.py b/app/scodoc/sco_codes_parcours.py index 14c8d8f9..a19ab4f4 100644 --- a/app/scodoc/sco_codes_parcours.py +++ b/app/scodoc/sco_codes_parcours.py @@ -30,6 +30,8 @@ import collections import enum +import numpy as np + from app import log @@ -487,7 +489,7 @@ class ParcoursLP2014(TypeParcours): (ue_status["moy"], ue_status["coef_ue"]) for ue_status in ues_status if ue_status["ue"]["type"] == UE_STAGE_LP - and type(ue_status["moy"]) == float + and np.issubdtype(type(ue_status["moy"]), np.floating) ] # Moyenne des moyennes: sum_coef = sum(x[1] for x in mc_stages_proj)