From 5f31277ce13b67a9ff4846eefa87db55205b5312 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Thu, 7 Sep 2017 12:21:38 -0700 Subject: [PATCH] Remove unhelpful preload in Stock::Estimator These included records aren't being used by the taxation classes, which do their own querying. --- core/app/models/spree/stock/estimator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/app/models/spree/stock/estimator.rb b/core/app/models/spree/stock/estimator.rb index 5ba5b88417e..2147aa2aa41 100644 --- a/core/app/models/spree/stock/estimator.rb +++ b/core/app/models/spree/stock/estimator.rb @@ -46,7 +46,7 @@ def calculate_shipping_rates(package) def shipping_methods(package) package.shipping_methods .available_for_address(package.shipment.order.ship_address) - .includes(:calculator, tax_category: :tax_rates) + .includes(:calculator) .to_a .select do |ship_method| calculator = ship_method.calculator