Skip to content
Snippets Groups Projects
Commit aae5068b authored by Emmanuel Viennet's avatar Emmanuel Viennet
Browse files

inscription étudiant: rapproche invalidation cache

parent 7c6a3503
Branches
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment