From 35ab399d2c1266a48f86b85bee7d9b11f4520cae Mon Sep 17 00:00:00 2001 From: Henning Normann Date: Fri, 18 Oct 2024 12:15:06 +0200 Subject: [PATCH] Filtered away migrated a1/a2 apps --- .../Clients/ApplicationsClient.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Altinn.ResourceRegistry.Integration/Clients/ApplicationsClient.cs b/src/Altinn.ResourceRegistry.Integration/Clients/ApplicationsClient.cs index 59f56e7a..796d5890 100644 --- a/src/Altinn.ResourceRegistry.Integration/Clients/ApplicationsClient.cs +++ b/src/Altinn.ResourceRegistry.Integration/Clients/ApplicationsClient.cs @@ -38,7 +38,14 @@ public ApplicationsClient(HttpClient client, IOptions settings { HttpResponseMessage response = await _client.GetAsync(availabbleServicePath, cancellationToken); - return await response.Content.ReadFromJsonAsync(SerializerOptions, cancellationToken); + ApplicationList? applications = await response.Content.ReadFromJsonAsync(SerializerOptions, cancellationToken); + return applications != null + ? new() + { + Applications = applications.Applications + .Where(a => !a.Id.Contains("/a2-") && !a.Id.Contains("/a1-")).ToList() + } + : null; } catch (Exception ex) {