diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs index 32bcbdd0..f8dbf4f6 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs @@ -29,8 +29,17 @@ namespace EShopOnAbp.PublicWeb.Pages public async Task OnGet(Guid id) { - IsPurschased = (await _orderAppService.GetMyOrdersAsync(new GetMyOrdersInput())).Any(p => p.Items.Any(p => p.ProductId == id)); Product = await _productAppService.GetAsync(id); + + try + { + IsPurschased = (await _orderAppService.GetMyOrdersAsync(new GetMyOrdersInput())).Any(p => p.Items.Any(p => p.ProductId == id)); + } + catch (Exception e) + { + IsPurschased = false; + Console.WriteLine(e); + } } } } \ No newline at end of file