diff --git a/app/system/actors/ReservationPollerActor.scala b/app/system/actors/ReservationPollerActor.scala index 13c188ddc..a0c870f55 100644 --- a/app/system/actors/ReservationPollerActor.scala +++ b/app/system/actors/ReservationPollerActor.scala @@ -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`(