Fix warnings

This commit is contained in:
James Chapman 2023-08-11 20:00:58 +01:00
parent 3824c72191
commit 08bdf72ff6
Signed by: jamsch0
GPG Key ID: 765FE58130277547

View File

@ -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);