mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Use :for_hubs scope
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user