diff --git a/src/SFA.DAS.EmployerAccounts/Queries/GetLegalEntity/GetLegalEntityQueryHandler.cs b/src/SFA.DAS.EmployerAccounts/Queries/GetLegalEntity/GetLegalEntityQueryHandler.cs index 02db1c6e31..06cb0d71ce 100644 --- a/src/SFA.DAS.EmployerAccounts/Queries/GetLegalEntity/GetLegalEntityQueryHandler.cs +++ b/src/SFA.DAS.EmployerAccounts/Queries/GetLegalEntity/GetLegalEntityQueryHandler.cs @@ -27,7 +27,8 @@ public async Task Handle(GetLegalEntityQuery message) .Where(l => l.LegalEntityId == message.LegalEntityId && l.Account.HashedId == message.AccountHashedId && - (l.PendingAgreementId != null || l.SignedAgreementId != null)) + (l.PendingAgreementId != null || l.SignedAgreementId != null) && + l.Deleted == null) .ProjectTo(_configurationProvider, new { accountHashedId = message.AccountHashedId