diff --git a/src/Codecool.CodecoolShop/Controllers/CartController.cs b/src/Codecool.CodecoolShop/Controllers/CartController.cs index 06ead5a..11d5966 100644 --- a/src/Codecool.CodecoolShop/Controllers/CartController.cs +++ b/src/Codecool.CodecoolShop/Controllers/CartController.cs @@ -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); } @@ -194,4 +194,4 @@ public IActionResult Error() { return View(new ErrorViewModel {RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier}); } -} \ No newline at end of file +}