From 08bdf72ff6fbf6ad4d9202ebdf4313af96fd112c Mon Sep 17 00:00:00 2001 From: James Chapman Date: Fri, 11 Aug 2023 20:00:58 +0100 Subject: [PATCH] Fix warnings --- Groceries/Items/ItemsController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Groceries/Items/ItemsController.cs b/Groceries/Items/ItemsController.cs index cecc20e..77687bb 100644 --- a/Groceries/Items/ItemsController.cs +++ b/Groceries/Items/ItemsController.cs @@ -37,7 +37,7 @@ public class ItemsController : Controller group => group.lastPurchase.DefaultIfEmpty(), (group, lastPurchase) => new ItemListModel.Item(group.item.Id, group.item.Brand, group.item.Name) { - HasBarcode = group.item.Barcodes.Any(), + HasBarcode = group.item.Barcodes.Count != 0, LastPurchasedAt = lastPurchase != null ? lastPurchase.CreatedAt : null, }) .ToListPageModelAsync(page, cancellationToken: HttpContext.RequestAborted);