From deae03785aa73435e401b575950bc67b34896b05 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Fri, 12 May 2023 07:18:27 +0300 Subject: [PATCH] Distinct DeprecatedSkus on merging during file post --- RhSolutions.Api/Controllers/ProductsController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RhSolutions.Api/Controllers/ProductsController.cs b/RhSolutions.Api/Controllers/ProductsController.cs index 34ed05b..eaedf9f 100644 --- a/RhSolutions.Api/Controllers/ProductsController.cs +++ b/RhSolutions.Api/Controllers/ProductsController.cs @@ -40,7 +40,7 @@ namespace RhSolutions.Api.Controllers .Select(g => new Product(g.Key) { 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(), IsOnWarehouse = g.Any(p => p.IsOnWarehouse == true), ProductMeasure = g.First().ProductMeasure,