quick fix

This commit is contained in:
Laura Hausmann 2020-10-19 01:54:14 +02:00
parent dd7527815e
commit 7f6560a6aa
Signed by: zotan
GPG Key ID: 5EC1D38FFC321311
1 changed files with 3 additions and 1 deletions

View File

@ -37,8 +37,10 @@ namespace bahnplan.web.Pages {
return;
}
if (!db.Legs.Any(p => p.TripId == int.Parse(Request.Query["id"])))
if (!db.Legs.Any(p => p.TripId == int.Parse(Request.Query["id"]))) {
RedirToIndex = true;
return;
}
Legs = db.Legs.Where(p => p.TripId == int.Parse(Request.Query["id"])).OrderBy(p => p.DepTime).ToList();
User = db.Users.First(p => p.UserId == Legs.First().UserId).Username;