mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Only return order with the selected shipping rates is true
Same concept as https://github.com/openfoodfoundation/openfoodnetwork/blob/master/app/services/search_orders.rb#L31
This commit is contained in:
@@ -126,7 +126,7 @@ module OpenFoodNetwork
|
||||
|
||||
def filter_to_shipping_method(orders)
|
||||
if params[:shipping_method_in].present?
|
||||
orders.joins(shipments: :shipping_rates).where(spree_shipping_rates: { shipping_method_id: params[:shipping_method_in] })
|
||||
orders.joins(shipments: :shipping_rates).where(spree_shipping_rates: { selected: true, shipping_method_id: params[:shipping_method_in] })
|
||||
else
|
||||
orders
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user