Fix assiduite migration (2)

This commit is contained in:
Emmanuel Viennet 2023-07-18 09:33:40 +02:00
parent d86681b268
commit 753deac3b7

View File

@ -331,11 +331,6 @@ def migrate_dept(dept_name: str, stats: _Statistics, time_elapsed: Profiler):
db.session.commit() db.session.commit()
justifs: Justificatif = Justificatif.query
if dept_name is not None:
justifs.filter(Justificatif.etudid.in_(etuds_id))
print_progress_bar( print_progress_bar(
absences_len, absences_len,
absences_len, absences_len,
@ -350,6 +345,7 @@ def migrate_dept(dept_name: str, stats: _Statistics, time_elapsed: Profiler):
+ TerminalColor.RESET + TerminalColor.RESET
) )
justifs: Justificatif = Justificatif.query.join(Identite).filter_by(dept_id=dept.id)
compute_assiduites_justified(justifs, reset=True) compute_assiduites_justified(justifs, reset=True)
time_elapsed.stop() time_elapsed.stop()