From b72b46b86437632c1c8ec53d5b91078409aeb5d9 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Mon, 8 Jan 2024 14:32:22 -0600 Subject: [PATCH] [AltStoreCore] Makes PledgeTier.name optional to match Patreon API --- .../AltStore.xcdatamodeld/AltStore 15.xcdatamodel/contents | 2 +- AltStoreCore/Model/Patreon/PledgeTier.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AltStoreCore/Model/AltStore.xcdatamodeld/AltStore 15.xcdatamodel/contents b/AltStoreCore/Model/AltStore.xcdatamodeld/AltStore 15.xcdatamodel/contents index 3367fcee..6a764404 100644 --- a/AltStoreCore/Model/AltStore.xcdatamodeld/AltStore 15.xcdatamodel/contents +++ b/AltStoreCore/Model/AltStore.xcdatamodeld/AltStore 15.xcdatamodel/contents @@ -196,7 +196,7 @@ - + diff --git a/AltStoreCore/Model/Patreon/PledgeTier.swift b/AltStoreCore/Model/Patreon/PledgeTier.swift index 998a92c7..f4191a83 100644 --- a/AltStoreCore/Model/Patreon/PledgeTier.swift +++ b/AltStoreCore/Model/Patreon/PledgeTier.swift @@ -13,7 +13,7 @@ import CoreData public class PledgeTier: NSManagedObject, Fetchable { /* Properties */ - @NSManaged public private(set) var name: String + @NSManaged public private(set) var name: String? @NSManaged public private(set) var identifier: String @nonobjc public var amount: Decimal { _amount as Decimal } // In USD @@ -31,7 +31,7 @@ public class PledgeTier: NSManagedObject, Fetchable { super.init(entity: PledgeTier.entity(), insertInto: context) - self.name = tier.name ?? "" + self.name = tier.name self.identifier = tier.identifier self._amount = tier.amount as NSDecimalNumber }