Fix #576: invalidation cache lors des modifs assoc UE/refcomp

This commit is contained in:
Emmanuel Viennet 2023-01-23 11:29:08 -03:00 committed by iziram
parent a4072efe4c
commit 135ca9fc1c

View File

@ -219,6 +219,8 @@ class UniteEns(db.Model):
db.session.add(self) db.session.add(self)
db.session.commit() db.session.commit()
# Invalidation du cache
self.formation.invalidate_cached_sems()
log(f"ue.set_niveau_competence( {self}, {niveau} )") log(f"ue.set_niveau_competence( {self}, {niveau} )")
def set_parcour(self, parcour: ApcParcours): def set_parcour(self, parcour: ApcParcours):
@ -246,6 +248,8 @@ class UniteEns(db.Model):
self.niveau_competence = None self.niveau_competence = None
db.session.add(self) db.session.add(self)
db.session.commit() db.session.commit()
# Invalidation du cache
self.formation.invalidate_cached_sems()
log(f"ue.set_parcour( {self}, {parcour} )") log(f"ue.set_parcour( {self}, {parcour} )")