diff --git a/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Model/ExtractedProfile.swift b/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Model/ExtractedProfile.swift index 1fd0366c8e..70a76305b3 100644 --- a/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Model/ExtractedProfile.swift +++ b/LocalPackages/DataBrokerProtection/Sources/DataBrokerProtection/Model/ExtractedProfile.swift @@ -134,7 +134,7 @@ struct ExtractedProfile: Codable, Sendable { addresses = try container.decodeIfPresent([AddressCityState].self, forKey: .addresses) phoneNumbers = try container.decodeIfPresent([String].self, forKey: .phoneNumbers) relatives = try container.decodeIfPresent([String].self, forKey: .relatives) - profileUrl = try container.decode(String.self, forKey: .profileUrl) + profileUrl = try container.decodeIfPresent(String.self, forKey: .profileUrl) reportId = try container.decodeIfPresent(String.self, forKey: .reportId) age = try container.decodeIfPresent(String.self, forKey: .age) email = try container.decodeIfPresent(String.self, forKey: .email) diff --git a/LocalPackages/DataBrokerProtection/Tests/DataBrokerProtectionTests/DataBrokerProfileQueryOperationManagerTests.swift b/LocalPackages/DataBrokerProtection/Tests/DataBrokerProtectionTests/DataBrokerProfileQueryOperationManagerTests.swift index 5fa7f4b069..a8a3206600 100644 --- a/LocalPackages/DataBrokerProtection/Tests/DataBrokerProtectionTests/DataBrokerProfileQueryOperationManagerTests.swift +++ b/LocalPackages/DataBrokerProtection/Tests/DataBrokerProtectionTests/DataBrokerProfileQueryOperationManagerTests.swift @@ -98,8 +98,8 @@ final class DataBrokerProfileQueryOperationManagerTests: XCTestCase { let historyEvents = [HistoryEvent(extractedProfileId: extractedProfileId, brokerId: brokerId, profileQueryId: profileQueryId, type: .optOutRequested)] let mockScanOperation = ScanOperationData(brokerId: brokerId, profileQueryId: profileQueryId, preferredRunDate: currentPreferredRunDate, historyEvents: historyEvents) - let extractedProfileSaved1 = ExtractedProfile(id: 1, name: "Some name", profileUrl: "abc") - let extractedProfileSaved2 = ExtractedProfile(id: 1, name: "Some name", profileUrl: "zxz") + let extractedProfileSaved1 = ExtractedProfile(id: 1, name: "Some name", profileUrl: "abc", identifier: "abc") + let extractedProfileSaved2 = ExtractedProfile(id: 1, name: "Some name", profileUrl: "zxz", identifier: "zxz") let optOutData = [OptOutOperationData.mock(with: extractedProfileSaved1), OptOutOperationData.mock(with: extractedProfileSaved2)] @@ -915,7 +915,7 @@ extension ExtractedProfile { } static var mockWithoutId: ExtractedProfile { - ExtractedProfile(name: "Some name", profileUrl: "someOtherURL") + ExtractedProfile(name: "Some name", profileUrl: "someOtherURL", identifier: "ABC") } static func mockWithRemoveDate(_ date: Date) -> ExtractedProfile {