From 2b65d01079530b9701f5187af7bccd221ab15c12 Mon Sep 17 00:00:00 2001 From: Marthinus Ettienne van Zyl - u19012366 Date: Mon, 16 Oct 2023 13:03:56 +0200 Subject: [PATCH] Fix more code to align with standards --- .../kotlin/com/teamcaffeine/koja/service/AIUserDataService.kt | 2 +- .../com/teamcaffeine/koja/service/UserCalendarService.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/teamcaffeine/koja/service/AIUserDataService.kt b/src/main/kotlin/com/teamcaffeine/koja/service/AIUserDataService.kt index b09c4ff4..15c14563 100644 --- a/src/main/kotlin/com/teamcaffeine/koja/service/AIUserDataService.kt +++ b/src/main/kotlin/com/teamcaffeine/koja/service/AIUserDataService.kt @@ -199,7 +199,7 @@ class AIUserDataService(private val userRepository: UserRepository, private val if (timeSlotDuration / eventDuration >= 2) { var timeSlotOffset = 0L while (timeSlot.startTime.plusSeconds(timeSlotOffset) - .isBefore(timeSlot.endTime) + .isBefore(timeSlot.endTime) ) { tempTimeSlots.add( TimeSlot( diff --git a/src/main/kotlin/com/teamcaffeine/koja/service/UserCalendarService.kt b/src/main/kotlin/com/teamcaffeine/koja/service/UserCalendarService.kt index 000a44a1..aebdd45a 100644 --- a/src/main/kotlin/com/teamcaffeine/koja/service/UserCalendarService.kt +++ b/src/main/kotlin/com/teamcaffeine/koja/service/UserCalendarService.kt @@ -594,9 +594,9 @@ class UserCalendarService( if (recommendations != null) { toReturn = recommendations.mapValues { entry -> entry.value.l().map { - value -> + value -> value.m()["week_days"]?.m()?.mapValues { - attr -> + attr -> attr.value.l().map { it.s() ?: "" }