From 40014b83bdf85bc0d9af3d435f3c6c12d10cf6c4 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Wed, 23 Jan 2019 16:43:17 +0000 Subject: [PATCH] Fix order_cycle_management_report shipping methods filter The original fix to adapt to v2 was wrong and still using deprecated order.shipping_method_id, this new version is now filtering the correct shipping_method_id in shipping_rates --- lib/open_food_network/order_cycle_management_report.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_food_network/order_cycle_management_report.rb b/lib/open_food_network/order_cycle_management_report.rb index 72133a1ba3..d58a6d5dbf 100644 --- a/lib/open_food_network/order_cycle_management_report.rb +++ b/lib/open_food_network/order_cycle_management_report.rb @@ -107,7 +107,7 @@ module OpenFoodNetwork def filter_to_shipping_method(orders) if params[:shipping_method_in].present? - orders.joins(shipments: :shipping_methods).where(shipping_method_id: params[:shipping_method_in]) + orders.joins(shipments: :shipping_rates).where(spree_shipping_rates: { shipping_method_id: params[:shipping_method_in] }) else orders end