mirror of
https://github.com/bitwarden/server.git
synced 2025-07-06 18:42:49 -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);
|
.GetManyByOrganizationIdTypeAsync(organizationId, organizationApiKeyType);
|
||||||
|
|
||||||
// NOTE: Currently we only allow one type of api key per organization
|
// 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