Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Minor changes

KrzysztofPajak9e7998a86ad1
diff --git a/src/Business/Grand.Business.Catalog/Services/Products/ProductAttributeFormatter.cs b/src/Business/Grand.Business.Catalog/Services/Products/ProductAttributeFormatter.cs
index 89e61dc4f..16e77953c 100644
--- a/src/Business/Grand.Business.Catalog/Services/Products/ProductAttributeFormatter.cs
+++ b/src/Business/Grand.Business.Catalog/Services/Products/ProductAttributeFormatter.cs
@@ -188,6 +188,9 @@ namespace Grand.Business.Catalog.Services.Products
for (int i = 0; i < attributes.Count; i++)
{
var productAttribute = await _productAttributeService.GetProductAttributeById(attributes[i].ProductAttributeId);
+ if (productAttribute == null)
+ continue;
+
var attribute = attributes[i];
var valuesStr = _productAttributeParser.ParseValues(customAttributes, attribute.Id);
for (int j = 0; j < valuesStr.Count; j++)