Skip to content

Commit d0a9251

Browse files
refactor: make returning param nullable instead of suppressing issue
1 parent 7fefffe commit d0a9251

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/Quotas/src/Quotas.Infrastructure/Persistence/Database/QueryableExtensions/IdentitiesQueryableExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public static async Task<IEnumerable<Identity>> WithTier(this IQueryable<Identit
1010
return identities;
1111
}
1212

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

0 commit comments

Comments
 (0)