From 8e49800bdd53a9aa6c19cb322996f79efbe5f173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Mon, 13 Nov 2023 15:56:01 +0200 Subject: [PATCH] DimCallProgramme must have both date properties or it must be of type continuous application --- aspnetcore/src/Repositories/FundingCallIndexRepository.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/src/Repositories/FundingCallIndexRepository.cs b/aspnetcore/src/Repositories/FundingCallIndexRepository.cs index c5b1d97..4ae6301 100644 --- a/aspnetcore/src/Repositories/FundingCallIndexRepository.cs +++ b/aspnetcore/src/Repositories/FundingCallIndexRepository.cs @@ -25,7 +25,7 @@ protected override IQueryable GetAll() return _context.DimCallProgrammes .AsNoTracking() .AsSplitQuery() - .Where(callProgramme => callProgramme.Id != -1 && callProgramme.DimOrganizations.Count > 0) + .Where(callProgramme => callProgramme.Id != -1 && callProgramme.DimOrganizations.Count > 0 && (callProgramme.DimDateIdOpen != -1 && callProgramme.DimDateIdDue != -1 || callProgramme.ContinuousApplicationPeriod == true)) .ProjectTo(_mapper.ConfigurationProvider); } @@ -37,7 +37,7 @@ protected override IQueryable GetChunk(int skipAmount, int takeAmou .Take(takeAmount) .AsNoTracking() .AsSplitQuery() - .Where(callProgramme => callProgramme.Id != -1 && callProgramme.DimOrganizations.Count > 0) + .Where(callProgramme => callProgramme.Id != -1 && callProgramme.DimOrganizations.Count > 0 && (callProgramme.DimDateIdOpen != -1 && callProgramme.DimDateIdDue != -1 || callProgramme.ContinuousApplicationPeriod == true)) .ProjectTo(_mapper.ConfigurationProvider); }