Put it better

This commit is contained in:
Paul Schneider 2021-08-11 23:59:08 +01:00
commit 7f0518ec82
2 changed files with 15 additions and 1 deletions

View file

@ -23,7 +23,7 @@ namespace isn
public async Task<IActionResult> Index(PackageVersionIndexViewModel model)
{
var applicationDbContext = _context.PackageVersions.Include(p => p.Package).Where(
p => ( model.Prerelease || p.IsPrerelease)
p => ( model.Prerelease || !p.IsPrerelease)
&& ((model.PackageId == null) || p.PackageId.StartsWith(model.PackageId)));
model.Versions = await applicationDbContext.ToArrayAsync();
return View(model);