diff --git a/NOICommunity/TodayFeature/EventsFeature/View Models/EventsViewModel.swift b/NOICommunity/TodayFeature/EventsFeature/View Models/EventsViewModel.swift index 360c8e6..0475600 100644 --- a/NOICommunity/TodayFeature/EventsFeature/View Models/EventsViewModel.swift +++ b/NOICommunity/TodayFeature/EventsFeature/View Models/EventsViewModel.swift @@ -191,7 +191,7 @@ private extension Event { var imageURL = (eventShort.imageGallery ?? []) .lazy - .compactMap(\.imageUrl) + .compactMap { $0?.imageUrl } .first .flatMap(URL.init(string:)) // Get an image from a http url as https content diff --git a/NOICommunityLib/Sources/EventShortClient/Models.swift b/NOICommunityLib/Sources/EventShortClient/Models.swift index c1dc920..3679655 100644 --- a/NOICommunityLib/Sources/EventShortClient/Models.swift +++ b/NOICommunityLib/Sources/EventShortClient/Models.swift @@ -76,21 +76,21 @@ public struct EventShort: Decodable, Equatable { public let contactPostalCode: String? public let contactCity: String? public let contactCountry: String? - public let roomBooked: [RoomBooked]? - public let imageGallery: [ImageGallery]? + public let roomBooked: [RoomBooked?]? + public let imageGallery: [ImageGallery?]? public let videoUrl: String? public let activeWeb: Bool? public let eventTextDE: String? public let eventTextIT: String? public let eventTextEN: String? public let technologyFields: [String?]? - public let customTagging: [String]? + public let customTagging: [String?]? public let soldOut: Bool? public let eventDocument: [DocumentPDF]? public let externalOrganizer: Bool? public let shortname: String? public let gpsPoints: GpsInfo? - public let publishedOn: [String]? + public let publishedOn: [String?]? } // MARK: - EventShortListRequest