From 753deac3b7153de5b02f49bdbebd54ca15488441 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 18 Jul 2023 09:33:40 +0200 Subject: [PATCH] Fix assiduite migration (2) --- tools/migrate_abs_to_assiduites.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/migrate_abs_to_assiduites.py b/tools/migrate_abs_to_assiduites.py index 61bf1b97..278873e9 100644 --- a/tools/migrate_abs_to_assiduites.py +++ b/tools/migrate_abs_to_assiduites.py @@ -331,11 +331,6 @@ def migrate_dept(dept_name: str, stats: _Statistics, time_elapsed: Profiler): db.session.commit() - justifs: Justificatif = Justificatif.query - - if dept_name is not None: - justifs.filter(Justificatif.etudid.in_(etuds_id)) - print_progress_bar( absences_len, absences_len, @@ -350,6 +345,7 @@ def migrate_dept(dept_name: str, stats: _Statistics, time_elapsed: Profiler): + TerminalColor.RESET ) + justifs: Justificatif = Justificatif.query.join(Identite).filter_by(dept_id=dept.id) compute_assiduites_justified(justifs, reset=True) time_elapsed.stop()