From 65d00d4754f9ece0e5c9006d90e70cdbc8386170 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 8 Sep 2022 10:28:12 +0200 Subject: [PATCH] Ajout detection bug cache coef module --- app/comp/moy_mod.py | 6 ++++++ app/views/notes.py | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/comp/moy_mod.py b/app/comp/moy_mod.py index b37dac494..673e356c0 100644 --- a/app/comp/moy_mod.py +++ b/app/comp/moy_mod.py @@ -447,6 +447,12 @@ def moduleimpl_is_conforme( # il arrive (#bug) que le cache ne soit pas à jour... sco_cache.invalidate_formsemestre() raise ScoBugCatcher("moduleimpl_is_conforme: nb ue incoherent") + + if moduleimpl.module_id not in modules_coefficients: + # soupçon de bug cache coef ? + sco_cache.invalidate_formsemestre() + raise ScoBugCatcher("Erreur 454 - merci de ré-essayer") + module_evals_poids = evals_poids.transpose().sum(axis=1) != 0 return all((modules_coefficients[moduleimpl.module_id] != 0).eq(module_evals_poids)) diff --git a/app/views/notes.py b/app/views/notes.py index 9c69d9351..82348c3b8 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -79,8 +79,6 @@ from app.scodoc.scolog import logdb from app.scodoc.sco_exceptions import ( AccessDenied, - ScoBugCatcher, - ScoException, ScoValueError, ScoInvalidIdType, )