From c66cae0dd28f715f0721ab1b21fe77c88d0978c7 Mon Sep 17 00:00:00 2001 From: plockwood Date: Mon, 13 Nov 2023 15:06:33 +0000 Subject: [PATCH] only open trusts on search --- .../Repositories/TrustRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dfe.Academies.Api.Infrastructure/Repositories/TrustRepository.cs b/Dfe.Academies.Api.Infrastructure/Repositories/TrustRepository.cs index 159527c61..54ff4e0d6 100644 --- a/Dfe.Academies.Api.Infrastructure/Repositories/TrustRepository.cs +++ b/Dfe.Academies.Api.Infrastructure/Repositories/TrustRepository.cs @@ -60,7 +60,7 @@ public async Task> GetTrustsByUkprns(string[] ukprns, CancellationTo && ( trust.TrustType.Name == "Single-academy trust" || trust.TrustType.Name == "Multi-academy trust" - )) + ) && trust.TrustStatus == "Open") .OrderBy(trust => trust.GroupUID); return (await filteredGroups.Skip((page - 1) * count).Take(count).ToListAsync(cancellationToken).ConfigureAwait(false), filteredGroups.Count());