Browse Source

Merge pull request #57 from RayMMond/FixEmptyProductAttributes

Handle empty attributes when serializing project attributes
pull/58/head
Super 6 years ago
committed by GitHub
parent
commit
4a6643232e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/AttributeOptionIdsSerializer.cs

5
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/AttributeOptionIdsSerializer.cs

@ -23,6 +23,11 @@ namespace EasyAbp.EShop.Products.Products
public Task<string> SerializeAsync(IEnumerable<Guid> attributeOptionIds)
{
if (attributeOptionIds == null)
{
return Task.FromResult(string.Empty);
}
return Task.FromResult(_jsonSerializer.Serialize(attributeOptionIds.OrderBy(x => x)));
}

Loading…
Cancel
Save