From e3535aa4dacd897a677fe6b6c86215b3c47031fc Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 4 Jan 2022 19:46:35 +0100 Subject: [PATCH] =?UTF-8?q?check=5Fmoduleimpl=5Fconformity:=20modif=20exc?= =?UTF-8?q?=20incoh=C3=A9rence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/comp/moy_mod.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/comp/moy_mod.py b/app/comp/moy_mod.py index 41000fd4b..f21e6acdd 100644 --- a/app/comp/moy_mod.py +++ b/app/comp/moy_mod.py @@ -36,6 +36,7 @@ import pandas as pd from pandas.core.frame import DataFrame from app import db +from app import log from app import models from app.models import ModuleImpl, Evaluation, EvaluationUEPoids from app.scodoc import sco_utils as scu @@ -79,7 +80,11 @@ def check_moduleimpl_conformity( if nb_ues == 0: return False # situation absurde (pas d'UE) if len(modules_coefficients) != nb_ues: - raise ValueError("check_moduleimpl_conformity: nb ue incoherent") + # bug ? + log( + "check_moduleimpl_conformity: nb ue incoherent (moduleimpl.id={moduleimpl.id})" + ) + return False module_evals_poids = evals_poids.transpose().sum(axis=1).to_numpy() != 0 check = all( (modules_coefficients[moduleimpl.module.id].to_numpy() != 0)