Skip to content

Commit

Permalink
Merge pull request #97 from CSCfi/CSCTTV-3503-funding_call-date
Browse files Browse the repository at this point in the history
DimCallProgramme must have both date properties or continuous application
  • Loading branch information
sarkikos authored Nov 14, 2023
2 parents 9fd9a42 + 8e49800 commit 81afb1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aspnetcore/src/Repositories/FundingCallIndexRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected override IQueryable<FundingCall> 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<FundingCall>(_mapper.ConfigurationProvider);
}

Expand All @@ -37,7 +37,7 @@ protected override IQueryable<FundingCall> 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<FundingCall>(_mapper.ConfigurationProvider);
}

Expand Down

0 comments on commit 81afb1d

Please sign in to comment.