diff --git a/src/main/java/com/tarento/upsmf/examsAndAdmissions/service/HallTicketService.java b/src/main/java/com/tarento/upsmf/examsAndAdmissions/service/HallTicketService.java index 511213d1b16e136134e703d533d2742f61e004e0..727ba06417dec13c622bfc45c1bb6df0d1df8054 100644 --- a/src/main/java/com/tarento/upsmf/examsAndAdmissions/service/HallTicketService.java +++ b/src/main/java/com/tarento/upsmf/examsAndAdmissions/service/HallTicketService.java @@ -346,10 +346,10 @@ public class HallTicketService { formattedRequest.put("lastName", student.getSurname()); // changed from 'surName' formattedRequest.put("enrollmentNumber", student.getEnrollmentNumber()); - StudentExamRegistration registration = studentExamRegistrationRepository.getByStudentIdAndExamCycleId(student.getId(), request.getExamCycle().getId()); + List<StudentExamRegistration> registration = studentExamRegistrationRepository.getByExamCycleIdAndStudentId(request.getExamCycle().getId(), student.getId()) ; if (registration != null) { Map<String, Object> examCycleData = new HashMap<>(); - ExamCycle examCycle = registration.getExamCycle(); + ExamCycle examCycle = registration.get(0).getExamCycle(); examCycleData.put("id", examCycle.getId()); examCycleData.put("examCyclename", examCycle.getExamCycleName());