Skip to content

Commit

Permalink
Fix some sonar nitpicks
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorntore committed Jul 5, 2024
1 parent 0024f8b commit 985b0d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/Altinn.App.Api/Controllers/DataController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Globalization;
using System.Net;
using System.Security.Claims;
using System.Text.Json;
using Altinn.App.Api.Helpers;
using Altinn.App.Api.Helpers.RequestHandling;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ [FromRoute] Guid dataGuid
)
{
Instance instance = await _instanceClient.GetInstance(app, org, instanceOwnerPartyId, instanceGuid);
DataElement? dataElement = instance.Data.FirstOrDefault(m =>
DataElement? dataElement = instance.Data.Find(m =>
m.Id.Equals(dataGuid.ToString(), StringComparison.OrdinalIgnoreCase)
);

Expand Down Expand Up @@ -116,7 +116,7 @@ [FromBody] UserDefinedMetadataDto userDefinedMetadataDto
}

Instance instance = await _instanceClient.GetInstance(app, org, instanceOwnerPartyId, instanceGuid);
DataElement? dataElement = instance.Data.FirstOrDefault(m =>
DataElement? dataElement = instance.Data.Find(m =>
m.Id.Equals(dataGuid.ToString(), StringComparison.OrdinalIgnoreCase)
);

Expand Down
2 changes: 1 addition & 1 deletion src/Altinn.App.Api/Helpers/ValidContributorHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Altinn.App.Api.Helpers;
/// Helper class for validating if a user is a valid contributor to a data type.
/// </summary>
/// <remarks>
/// TODO: The concept of inline authorization of valid contributors is not widely used and is likely not the best approach for doing authorization on the data type level, but there is no support for it yet in the policy based authorization, so keeping for now.
/// The concept of inline authorization of valid contributors is not widely used and is likely not the best approach for doing authorization on the data type level, but there is no support for it yet in the policy based authorization, so keeping for now.
/// </remarks>
internal static class ValidContributorHelper
{
Expand Down

0 comments on commit 985b0d5

Please sign in to comment.