From 0174d68a985a2598e133c48a2476829777882c3d Mon Sep 17 00:00:00 2001 From: iziram Date: Sun, 30 Jul 2023 18:59:06 +0200 Subject: [PATCH] Assiduites : bugfix justificatif delete --- app/api/justificatifs.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/api/justificatifs.py b/app/api/justificatifs.py index c3e4442a1..316613027 100644 --- a/app/api/justificatifs.py +++ b/app/api/justificatifs.py @@ -426,11 +426,14 @@ def _delete_singular(justif_id: int, database): archiver.delete_justificatif(justificatif_unique.etudid, archive_name) except ValueError: pass - compute_assiduites_justified( - justificatif_unique.etudid, [justificatif_unique], True - ) + scass.simple_invalidate_cache(justificatif_unique.to_dict()) database.session.delete(justificatif_unique) + compute_assiduites_justified( + justificatif_unique.etudid, + Justificatif.query.filter_by(etudid=justificatif_unique.etudid).all(), + True, + ) return (200, "OK")