diff --git a/backend/app/students/routes/enrollments.py b/backend/app/students/routes/enrollments.py index 423f155..7fe5112 100644 --- a/backend/app/students/routes/enrollments.py +++ b/backend/app/students/routes/enrollments.py @@ -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}