From 2dc74af2906bf9546b9fc8d734a0b08cbbc2a703 Mon Sep 17 00:00:00 2001 From: Valtteri Kantanen Date: Mon, 28 Oct 2024 14:57:49 +0200 Subject: [PATCH] [Close to graduation] Fix semester enrollments in Excel export --- .../frontend/src/components/CloseToGraduation/index.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/services/frontend/src/components/CloseToGraduation/index.jsx b/services/frontend/src/components/CloseToGraduation/index.jsx index 0569dc578e..cd4a54f8b7 100644 --- a/services/frontend/src/components/CloseToGraduation/index.jsx +++ b/services/frontend/src/components/CloseToGraduation/index.jsx @@ -156,10 +156,8 @@ const getColumns = ( if (!student.studyright.semesterEnrollments) { return 'Not enrolled' } - const enrollment = student.studyright.semesterEnrollments.find( - enrollment => enrollment.semestercode === semester - ) - return getEnrollmentTypeTextForExcel(enrollment?.enrollmenttype, enrollment?.statutoryAbsence) + const enrollment = student.studyright.semesterEnrollments.find(enrollment => enrollment.semester === semester) + return getEnrollmentTypeTextForExcel(enrollment?.type, enrollment?.statutoryAbsence) }, })), },