1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-01 23:31:41 +01:00

Fixed null issue when an organization key does not exist (#2501)

This commit is contained in:
SmithThe4th 2022-12-15 11:11:27 -07:00 committed by GitHub
parent 7cbc4a8970
commit 9ce6ee443b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,6 @@ public class GetOrganizationApiKeyQuery : IGetOrganizationApiKeyQuery
.GetManyByOrganizationIdTypeAsync(organizationId, organizationApiKeyType);
// NOTE: Currently we only allow one type of api key per organization
return apiKeys.Single();
return apiKeys.SingleOrDefault();
}
}