clear all caches after delete dept
This commit is contained in:
parent
2c9aacc330
commit
ca4d9817e6
@ -278,8 +278,10 @@ def _style_sems(sems):
|
|||||||
|
|
||||||
|
|
||||||
def delete_dept(dept_id: int):
|
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)
|
assert isinstance(dept_id, int)
|
||||||
|
from app import clear_scodoc_cache
|
||||||
|
|
||||||
# Un peu complexe, merci JMP :)
|
# Un peu complexe, merci JMP :)
|
||||||
cnx = ndb.GetDBConnexion()
|
cnx = ndb.GetDBConnexion()
|
||||||
cursor = cnx.cursor()
|
cursor = cnx.cursor()
|
||||||
@ -360,3 +362,4 @@ def delete_dept(dept_id: int):
|
|||||||
cnx.rollback()
|
cnx.rollback()
|
||||||
finally:
|
finally:
|
||||||
cnx.commit()
|
cnx.commit()
|
||||||
|
app.clear_scodoc_cache()
|
||||||
|
Loading…
Reference in New Issue
Block a user