diff --git a/tools/migrate_abs_to_assiduites.py b/tools/migrate_abs_to_assiduites.py index 61bf1b97f2..278873e9be 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()