mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
Fixed null issue when an organization key does not exist (#2501)
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user