Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Codecool.CodecoolShop/Controllers/CartController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public IActionResult Index()
var userId = _userManager.GetUserId(User);
orderedProducts = _context.OrderedProducts
.Include(p => p.Order)
.Where(p => p.Order.User_id == userId && p.Order.OrderPayed == "No")
.Where(p => p.Order.User_id == userId && p.Order.OrderPayed == "No") //hardcoded value, co jezeli na bazie bedzie string z nazwa "NO" Wtedy Twoj kod nie zadziala. Albo daj to do consta/enuma zeby w calej aplikacji bylo wiadomo ze chodzi o te NO albo porownaj ten string niezaleznie od casingu liter
.ToList();
return View(orderedProducts);
}
Expand Down Expand Up @@ -194,4 +194,4 @@ public IActionResult Error()
{
return View(new ErrorViewModel {RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier});
}
}
}