0
0

Distinct DeprecatedSkus on merging during file post

This commit is contained in:
Sergey Chebotar 2023-05-12 07:18:27 +03:00
parent 1002b7a3b9
commit deae03785a

View File

@ -40,7 +40,7 @@ namespace RhSolutions.Api.Controllers
.Select(g => new Product(g.Key) .Select(g => new Product(g.Key)
{ {
Name = g.First().Name, Name = g.First().Name,
DeprecatedSkus = g.SelectMany(p => p.DeprecatedSkus).ToList(), DeprecatedSkus = g.SelectMany(p => p.DeprecatedSkus).Distinct().ToList(),
ProductLines = g.SelectMany(p => p.ProductLines).Distinct().ToList(), ProductLines = g.SelectMany(p => p.ProductLines).Distinct().ToList(),
IsOnWarehouse = g.Any(p => p.IsOnWarehouse == true), IsOnWarehouse = g.Any(p => p.IsOnWarehouse == true),
ProductMeasure = g.First().ProductMeasure, ProductMeasure = g.First().ProductMeasure,