mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix spec by adding necessary references statement
This commit is contained in:
@@ -60,7 +60,7 @@ module OpenFoodNetwork
|
||||
def filter_to_supplier(orders)
|
||||
if params[:supplier_id].to_i > 0
|
||||
orders.select do |order|
|
||||
order.line_items.includes(:product).where("spree_products.supplier_id = ?", params[:supplier_id].to_i).count > 0
|
||||
order.line_items.includes(:product).references(:product).where("spree_products.supplier_id = ?", params[:supplier_id].to_i).count > 0
|
||||
end
|
||||
else
|
||||
orders
|
||||
|
||||
Reference in New Issue
Block a user