Skip to content

Commit

Permalink
refactor: make return type nullable and possibly return null
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaVetnic committed Jan 26, 2024
1 parent 320d4d0 commit 68272cd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace Backbone.Modules.Devices.Application.Extensions;

public static class TierQueryableExtensions
{
public static async Task<Tier> GetBasicTier(this IQueryable<Tier> query, CancellationToken cancellationToken)
public static async Task<Tier?> GetBasicTier(this IQueryable<Tier> query, CancellationToken cancellationToken)
{
var basicTier = await query.FirstOrDefaultAsync(t => t.Name == TierName.BASIC_DEFAULT_NAME, cancellationToken);
return basicTier!;
return basicTier;
}
}

0 comments on commit 68272cd

Please sign in to comment.