mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Eager-load serialized objects in variant query
This commit is contained in:
@@ -59,6 +59,7 @@ module OpenFoodNetwork
|
||||
scoper = OpenFoodNetwork::ScopeVariantToHub.new(@distributor)
|
||||
|
||||
shop_products_service.variants_relation.
|
||||
includes(:default_price, :stock_locations, :product).
|
||||
where(product_id: shop_products).
|
||||
each { |v| scoper.scope(v) }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user