From 49a57a0ace4a90fe785366e9ac11a3917dc53652 Mon Sep 17 00:00:00 2001 From: Jan Juna Date: Wed, 6 Jun 2018 18:04:15 +0200 Subject: [PATCH] chore(product-import): Refactor code - DRU #116 --- lib/product-import.coffee | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/product-import.coffee b/lib/product-import.coffee index 4088fea..fa60397 100644 --- a/lib/product-import.coffee +++ b/lib/product-import.coffee @@ -165,12 +165,9 @@ class ProductImport "Removing #{res.failedSkus} skus from processing due to a reassignment error" ) productsToProcess = @_filterOutProductsBySkus(productsToProcess, res.failedSkus) - - # fetch existing products - they should be reassigned now - @_getExistingProductsForSkus(@_extractUniqueSkus(productsToProcess)) ) - else - @_getExistingProductsForSkus(@_extractUniqueSkus(productsToProcess)) + .then () => + @_getExistingProductsForSkus(@_extractUniqueSkus(productsToProcess)) .then (queriedEntries) => if @defaultAttributesService debug 'Ensuring default attributes'