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:
parent
7cbc4a8970
commit
9ce6ee443b
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user