Fix small bug

This commit is contained in:
Emmanuel Viennet 2023-08-23 16:35:10 +02:00
parent 78add09990
commit 8ccfc06671
2 changed files with 4 additions and 6 deletions

View File

@ -1,19 +1,17 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
import datetime
import html
import traceback
from flask import g, current_app, abort
import psycopg2
import psycopg2.pool
import psycopg2.extras
from flask import g, current_app, abort
import app
import app.scodoc.sco_utils as scu
from app import log
from app.scodoc.sco_exceptions import ScoException, ScoValueError, NoteProcessError
import datetime
quote_html = html.escape

View File

@ -428,7 +428,7 @@ def invalidate_assiduites_count(etudid, sem):
"""Invalidate (clear) cached counts"""
date_debut = sem["date_debut_iso"]
date_fin = sem["date_fin_iso"]
for met in [string.lower() for string in scu.AssiduitesMetricShort.all()]:
for met in scu.AssiduitesMetrics.TAG:
key = str(etudid) + "_" + date_debut + "_" + date_fin + f"{met}_assiduites"
sco_cache.AbsSemEtudCache.delete(key)