From a2828ea3054bf85127afe2bbbf33cb1514c8202d Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Tue, 9 Oct 2018 11:21:21 +0100 Subject: [PATCH] Use :for_hubs scope --- app/models/product_import/entry_processor.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/models/product_import/entry_processor.rb b/app/models/product_import/entry_processor.rb index dd6a8c3b3d..2e8ed9592c 100644 --- a/app/models/product_import/entry_processor.rb +++ b/app/models/product_import/entry_processor.rb @@ -46,10 +46,7 @@ module ProductImport products_count = if settings.importing_into_inventory? - VariantOverride.where( - 'variant_overrides.hub_id IN (?)', - enterprise_id - ).count + VariantOverride.for_hubs([enterprise_id]).count else Spree::Variant. not_deleted.