From aae5068b7ee8d535d2365b3891cf3ab8f5ecc885 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 14 Jan 2025 17:52:54 +0100 Subject: [PATCH] =?UTF-8?q?inscription=20=C3=A9tudiant:=20rapproche=20inva?= =?UTF-8?q?lidation=20cache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/formsemestre.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/formsemestre.py b/app/models/formsemestre.py index 7e0eb1b7f..62a557034 100644 --- a/app/models/formsemestre.py +++ b/app/models/formsemestre.py @@ -1143,12 +1143,12 @@ class FormSemestre(models.ScoDocModel): msg=f"inscription en semestre {self.titre_annee()}", commit=True, ) + sco_cache.invalidate_formsemestre(formsemestre_id=self.id) log( f"inscrit_etudiant: {etud.nomprenom} ({etud.id}) au semestre {self.titre_annee()}" ) # Notification mail self._notify_inscription(etud) - sco_cache.invalidate_formsemestre(formsemestre_id=self.id) return inscr def desinscrit_etudiant(self, etud: Identite): @@ -1167,11 +1167,11 @@ class FormSemestre(models.ScoDocModel): msg=f"désinscription semestre {self.titre_annee()}", commit=True, ) + sco_cache.invalidate_formsemestre(formsemestre_id=self.id) log( f"desinscrit_etudiant: {etud.nomprenom} ({etud.id}) au semestre {self.titre_annee()}" ) self._notify_inscription(etud, action="désinscrit") - sco_cache.invalidate_formsemestre(formsemestre_id=self.id) def _notify_inscription(self, etud: Identite, action="inscrit") -> None: "Notifie inscription d'un étudiant: envoie un mail selon paramétrage"