From f21d43f252920190e31e36a0f98f308d59230fdf Mon Sep 17 00:00:00 2001 From: Thomas Rittson Date: Wed, 14 Aug 2024 10:58:27 +1000 Subject: [PATCH] Fix bug: using wrong id --- .../Policies/Implementations/SingleOrgPolicyStrategy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/AdminConsole/OrganizationFeatures/Policies/Implementations/SingleOrgPolicyStrategy.cs b/src/Core/AdminConsole/OrganizationFeatures/Policies/Implementations/SingleOrgPolicyStrategy.cs index 5500efb20..22b0af08f 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/Policies/Implementations/SingleOrgPolicyStrategy.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/Policies/Implementations/SingleOrgPolicyStrategy.cs @@ -38,7 +38,7 @@ public class SingleOrgPolicyStrategy : IPolicyStrategy { // Remove non-compliant users var orgUsers = await _organizationUserRepository.GetManyDetailsByOrganizationAsync(policy.OrganizationId); - var org = await _organizationRepository.GetByIdAsync(policy.Id); + var org = await _organizationRepository.GetByIdAsync(policy.OrganizationId); if (org == null) { throw new NotFoundException("Organization not found.");