Skip to content

Commit

Permalink
Merge pull request #96 from CSCfi/CSCTTV-3601-funding-call-must-have-…
Browse files Browse the repository at this point in the history
…related-organization

DimCallProgramme must have at least one related DimOrganization
  • Loading branch information
sarkikos authored Nov 13, 2023
2 parents 384445c + 22e0975 commit 9fd9a42
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)
.Where(callProgramme => callProgramme.Id != -1 && callProgramme.DimOrganizations.Count > 0)
.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)
.Where(callProgramme => callProgramme.Id != -1 && callProgramme.DimOrganizations.Count > 0)
.ProjectTo<FundingCall>(_mapper.ConfigurationProvider);
}

Expand Down

0 comments on commit 9fd9a42

Please sign in to comment.