Skip to content

Commit

Permalink
Fix - delete product specification
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofPajak committed Oct 11, 2021
1 parent 5afe95e commit 6a7a00e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Web/Grand.Web.Admin/Controllers/ProductController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,7 @@ public async Task<IActionResult> ProductSpecAttrDelete(ProductSpecificationAttri
if (product == null)
return Content("Product not exists");

var psa = product.ProductSpecificationAttributes.Where(x => x.Id == model.Id && x.SpecificationAttributeId == model.ProductSpecificationId).FirstOrDefault();
var psa = product.ProductSpecificationAttributes.Where(x => x.Id == model.Id).FirstOrDefault();
if (psa == null)
throw new ArgumentException("No specification attribute found with the specified id");

Expand Down

0 comments on commit 6a7a00e

Please sign in to comment.