From 3d4e2f363d555f8ba0868d2f8549c39ae0f10594 Mon Sep 17 00:00:00 2001 From: Hannes Braun Date: Sat, 16 Oct 2021 01:08:52 +0200 Subject: [PATCH] Only add timetable to cache on success --- .../org/mosad/thecitadelofricks/controller/CacheController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/org/mosad/thecitadelofricks/controller/CacheController.kt b/src/main/kotlin/org/mosad/thecitadelofricks/controller/CacheController.kt index e95c481..f438870 100644 --- a/src/main/kotlin/org/mosad/thecitadelofricks/controller/CacheController.kt +++ b/src/main/kotlin/org/mosad/thecitadelofricks/controller/CacheController.kt @@ -106,7 +106,7 @@ class CacheController { weekNumberYear ?: 0, timetableLink ), timetable ?: TimetableWeek() - ).also { timetableList[key] = it } + ).also { if (timetable != null) timetableList[key] = it } } }