This commit is contained in:
Emmanuel Viennet 2022-07-11 18:31:58 +02:00
parent 60f5bdfc60
commit 45d3106272
3 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,7 @@ def load_formsemestre_results(formsemestre: FormSemestre) -> ResultatsSemestre:
def load_formsemestre_validations(formsemestre: FormSemestre) -> ValidationsSemestre:
"""Charge les résultats de jury de ce semestre.
Search in local cache (g.formsemestre_result_cache)
If not in cache, build it and cache it.
If not in cache, build it and cache it (in g).
"""
if not hasattr(g, "formsemestre_validation_cache"):
g.formsemestre_validations_cache = {} # pylint: disable=C0237

View File

@ -386,6 +386,7 @@ def gen_formsemestre_recapcomplet_html(
table_html = sco_cache.TableRecapWithEvalsCache.get(formsemestre.id)
else:
table_html = sco_cache.TableRecapCache.get(formsemestre.id)
# en mode jury ne cache pas la table html
if mode_jury or (table_html is None):
table_html = _gen_formsemestre_recapcomplet_html(
formsemestre,

View File

@ -2664,6 +2664,7 @@ def formsemestre_jury_but_erase(formsemestre_id: int, etudid: int = None):
deca = jury_but.DecisionsProposeesAnnee(etud, formsemestre)
deca.erase()
db.session.commit()
log(f"formsemestre_jury_but_erase({formsemestre_id}, {etudid})")
flash("décisions de jury effacées")
return redirect(dest_url)