mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-04 07:09:14 +00:00
Adapt order_and_distributor_report to the new editable_orders query
This commit is contained in:
@@ -44,7 +44,7 @@ module OpenFoodNetwork
|
||||
|
||||
# If empty array is passed in, the where clause will return all line_items, which is bad
|
||||
orders_with_hidden_details =
|
||||
@permissions.editable_orders.empty? ? orders : orders.where('id NOT IN (?)', @permissions.editable_orders)
|
||||
@permissions.editable_orders.empty? ? orders : orders.where('spree_orders.id NOT IN (?)', @permissions.editable_orders)
|
||||
|
||||
orders.select{ |order| orders_with_hidden_details.include? order }.each do |order|
|
||||
# TODO We should really be hiding customer code here too, but until we
|
||||
|
||||
Reference in New Issue
Block a user