From ca4d9817e6f5da98fd18833f563044021c6e2381 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 2 Sep 2021 16:32:47 +0200 Subject: [PATCH] clear all caches after delete dept --- app/scodoc/sco_dept.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/scodoc/sco_dept.py b/app/scodoc/sco_dept.py index 1dbd9df0..a3d865e1 100644 --- a/app/scodoc/sco_dept.py +++ b/app/scodoc/sco_dept.py @@ -278,8 +278,10 @@ def _style_sems(sems): def delete_dept(dept_id: int): - """Supression irréversible d'un département et de tous les objets rattachés""" + """Suppression irréversible d'un département et de tous les objets rattachés""" assert isinstance(dept_id, int) + from app import clear_scodoc_cache + # Un peu complexe, merci JMP :) cnx = ndb.GetDBConnexion() cursor = cnx.cursor() @@ -360,3 +362,4 @@ def delete_dept(dept_id: int): cnx.rollback() finally: cnx.commit() + app.clear_scodoc_cache()