Skip to content

Commit

Permalink
refactor: make returning param nullable instead of suppressing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaDmitrasinovic committed Jan 23, 2024
1 parent 7fefffe commit d0a9251
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ public static async Task<IEnumerable<Identity>> WithTier(this IQueryable<Identit
return identities;
}

public static async Task<Identity> FirstWithAddress(this IQueryable<Identity> query, string address, CancellationToken cancellationToken)
public static async Task<Identity?> FirstWithAddress(this IQueryable<Identity> query, string address, CancellationToken cancellationToken)
{
return (await query.Where(identity => identity.Address == address).FirstOrDefaultAsync(cancellationToken))!;
return await query.Where(identity => identity.Address == address).FirstOrDefaultAsync(cancellationToken);
}
}

0 comments on commit d0a9251

Please sign in to comment.