1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-04 14:13:28 +01:00

Fix bug: using wrong id

This commit is contained in:
Thomas Rittson 2024-08-14 10:58:27 +10:00
parent cb3850c098
commit f21d43f252
No known key found for this signature in database
GPG Key ID: CDDDA03861C35E27

View File

@ -38,7 +38,7 @@ public class SingleOrgPolicyStrategy : IPolicyStrategy
{ {
// Remove non-compliant users // Remove non-compliant users
var orgUsers = await _organizationUserRepository.GetManyDetailsByOrganizationAsync(policy.OrganizationId); var orgUsers = await _organizationUserRepository.GetManyDetailsByOrganizationAsync(policy.OrganizationId);
var org = await _organizationRepository.GetByIdAsync(policy.Id); var org = await _organizationRepository.GetByIdAsync(policy.OrganizationId);
if (org == null) if (org == null)
{ {
throw new NotFoundException("Organization not found."); throw new NotFoundException("Organization not found.");