From 2c5eb21ef62219460d6da5167c09612cb3ac20aa Mon Sep 17 00:00:00 2001 From: Anh Do Date: Tue, 3 Dec 2024 12:31:56 -0500 Subject: [PATCH] Hotfix for schedulingConfig decoding issue when upgrading from prior versions --- .../Sources/DataBrokerProtection/Model/DataBroker.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Model/DataBroker.swift b/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Model/DataBroker.swift index 269eea17d8..4d87ae1416 100644 --- a/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Model/DataBroker.swift +++ b/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Model/DataBroker.swift @@ -174,7 +174,12 @@ public struct DataBroker: Codable, Sendable { version = try container.decode(String.self, forKey: .version) steps = try container.decode([Step].self, forKey: .steps) - schedulingConfig = try container.decode(DataBrokerScheduleConfig.self, forKey: .schedulingConfig) + // Hotfix for https://app.asana.com/0/1203581873609357/1208895331283089/f + do { + schedulingConfig = try container.decode(DataBrokerScheduleConfig.self, forKey: .schedulingConfig) + } catch { + schedulingConfig = .init(retryError: 48, confirmOptOutScan: 72, maintenanceScan: 120, maxAttempts: -1) + } parent = try? container.decode(String.self, forKey: .parent) do {