Skip to content

Commit

Permalink
Making where clause unambiguous
Browse files Browse the repository at this point in the history
  • Loading branch information
oeoeaio committed May 15, 2015
1 parent ef06481 commit 312a629
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ def orders_and_fulfillment
@line_items = permissions.visible_line_items.merge(Spree::LineItem.where(order_id: orders))
@line_items = @line_items.supplied_by_any(params[:supplier_id_in]) if params[:supplier_id_in].present?

line_items_with_hidden_details = @line_items.where("id NOT IN (?)", permissions.editable_line_items)
line_items_with_hidden_details = @line_items.where('"spree_line_items"."id" NOT IN (?)', permissions.editable_line_items)
@line_items.select{ |li| line_items_with_hidden_details.include? li }.each do |line_item|
# TODO We should really be hiding customer code here too, but until we
# have an actual association between order and customer, it's a bit tricky
Expand Down

0 comments on commit 312a629

Please sign in to comment.