From a9cde9e5934d39f5610d57055acabd4538acf75d Mon Sep 17 00:00:00 2001 From: dmitry Date: Mon, 1 Jul 2024 13:02:25 +0600 Subject: [PATCH] [~] fix for booking without organizer --- .../features/booking/converters/GoogleCalendarConverter.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/booking/converters/GoogleCalendarConverter.kt b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/booking/converters/GoogleCalendarConverter.kt index 4f4321313..868789227 100644 --- a/effectiveOfficeBackend/src/main/kotlin/office/effective/features/booking/converters/GoogleCalendarConverter.kt +++ b/effectiveOfficeBackend/src/main/kotlin/office/effective/features/booking/converters/GoogleCalendarConverter.kt @@ -164,7 +164,9 @@ class GoogleCalendarConverter( beginBooking = toLocalInstant(event.start), endBooking = toLocalInstant(event.end), recurrence = recurrence?.let { RecurrenceConverter.recurrenceToModel(it) }, - isDeclinedByOwner = participantModels.none { model -> model.email == organizerEmail } + isDeclinedByOwner = organizerEmail?.let { email -> + participantModels.none { model -> model.email == email } + } ?: false ) logger.trace("[toMeetingWorkspaceBooking] {}", booking.toString()) return booking