Skip to content

Commit 93cbfbf

Browse files
committed
Make attendance_status decoding optional
1 parent 227a360 commit 93cbfbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/Sources/Networking/Model/Bookings/Booking.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public struct Booking: Codable, GeneratedCopiable, Hashable, GeneratedFakeable {
107107
let resourceID = try container.decode(Int64.self, forKey: .resourceID)
108108
let startDate = Date(timeIntervalSince1970: try container.decode(Double.self, forKey: .startDate))
109109
let statusKey = try container.decode(String.self, forKey: .statusKey)
110-
let attendanceStatusKey = try container.decode(String.self, forKey: .attendanceStatusKey)
110+
let attendanceStatusKey = container.failsafeDecodeIfPresent(String.self, forKey: .attendanceStatusKey) ?? ""
111111
let localTimezone = try container.decode(String.self, forKey: .localTimezone)
112112
let currency = try container.decode(String.self, forKey: .currency)
113113
let orderInfo: BookingOrderInfo? = nil // to be prefilled when synced

0 commit comments

Comments
 (0)