Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSCEXAM-1339 Fix bug with reservation checker actor #1136

Merged
merged 2 commits into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions app/system/actors/ReservationPollerActor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ class ReservationPollerActor @Inject (
with DbApiHelper:

private def isPast(ee: ExamEnrolment): Boolean =
if (ee.getExaminationEventConfiguration == null && ee.getReservation != null)
if ee.getExaminationEventConfiguration == null && ee.getReservation != null then
val now = dateTimeHandler.adjustDST(DateTime.now)
ee.getReservation.getEndAt.isBefore(now)
else if (ee.getExaminationEventConfiguration != null) {
else if ee.getExaminationEventConfiguration != null then
val duration = ee.getExam.getDuration
val start = ee.getExaminationEventConfiguration.getExaminationEvent.getStart
start.plusMinutes(duration).isBeforeNow
}
false
else false

override def createReceive(): AbstractActor.Receive = receiveBuilder()
.`match`(
Expand Down