Remove eager loding of shipping_methods and shipping_rates from customer_totals so that report runs faster

Something makes the query run much slower with these includes
This commit is contained in:
luisramos0
2019-12-10 21:18:17 +00:00
parent c45e3c9cca
commit 0202b59634

View File

@@ -192,7 +192,7 @@ module OpenFoodNetwork
def line_item_includes
[{ variant: [{ option_values: :option_type }, { product: :supplier }],
order: [:bill_address, :ship_address, :order_cycle, :adjustments, :payments,
:user, :distributor, shipments: { shipping_rates: :shipping_method }] }]
:user, :distributor, :shipments] }]
end
private