diff --git a/PadelClub/Views/Tournament/Subscription/Purchase.swift b/PadelClub/Views/Tournament/Subscription/Purchase.swift index c37c957..103b5e4 100644 --- a/PadelClub/Views/Tournament/Subscription/Purchase.swift +++ b/PadelClub/Views/Tournament/Subscription/Purchase.swift @@ -71,7 +71,7 @@ class Purchase: ModelObject, Storable { self.user = try container.decodeEncrypted(key: .user) self.purchaseDate = try container.decode(Date.self, forKey: .purchaseDate) self.productId = try container.decode(String.self, forKey: .productId) - self.quantity = try container.decode(Int.self, forKey: .quantity) + self.quantity = try container.decodeIfPresent(Int.self, forKey: .quantity) self.revocationDate = try container.decodeIfPresent(Date.self, forKey: .revocationDate) self.expirationDate = try container.decodeIfPresent(Date.self, forKey: .expirationDate) }