Filter term of defences for students

This commit is contained in:
adam-skowronek 2023-01-08 19:17:17 +01:00
parent badbad7cf9
commit cd5b7d4dbd

View File

@ -114,4 +114,6 @@ def list_term_of_defences(examination_schedule_id: int, data: dict) -> dict:
filter(ExaminationSchedule.start_date_for_enrollment_students < now). \
filter(ExaminationSchedule.end_date_for_enrollment_students > now).all()
term_of_defences = list(filter(lambda n: len([d.id for d in n.members_of_committee if d.id == student.groups[0].project_supervisor.id]) > 0, term_of_defences))
return {'term_of_defences': term_of_defences}