From 19a0d9fdcb43bb8417b8916e2d3ad7fd94b587be Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 23 Feb 2023 21:48:40 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20invalidations=20cache=20si=20d=C3=A9sins?= =?UTF-8?q?cription=20ou=20DEM=20individuelle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_formsemestre_inscriptions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/scodoc/sco_formsemestre_inscriptions.py b/app/scodoc/sco_formsemestre_inscriptions.py index 739ace4f..cdbe2c57 100644 --- a/app/scodoc/sco_formsemestre_inscriptions.py +++ b/app/scodoc/sco_formsemestre_inscriptions.py @@ -176,6 +176,9 @@ def do_formsemestre_demission( ) db.session.add(event) db.session.commit() + sco_cache.invalidate_formsemestre( + formsemestre_id=formsemestre_id + ) # > démission ou défaillance if etat_new == scu.DEMISSION: flash("Démission enregistrée") elif etat_new == scu.DEF: @@ -188,7 +191,7 @@ def do_formsemestre_inscription_edit(args=None, formsemestre_id=None): _formsemestre_inscriptionEditor.edit(cnx, args) sco_cache.invalidate_formsemestre( formsemestre_id=formsemestre_id - ) # > modif inscription semestre (demission ?) + ) # > modif inscription semestre def do_formsemestre_desinscription(etudid, formsemestre_id): @@ -240,6 +243,7 @@ def do_formsemestre_desinscription(etudid, formsemestre_id): do_formsemestre_inscription_delete( insem["formsemestre_inscription_id"], formsemestre_id=formsemestre_id ) + sco_cache.invalidate_formsemestre(formsemestre_id=formsemestre_id) # --- Semestre extérieur if formsemestre.modalite == "EXT": inscrits = do_formsemestre_inscription_list(