diff --git a/app/models/spree/variant.rb b/app/models/spree/variant.rb index 93430b3b2b..71c10a16e3 100644 --- a/app/models/spree/variant.rb +++ b/app/models/spree/variant.rb @@ -114,7 +114,7 @@ module Spree joins(" LEFT OUTER JOIN (SELECT * FROM inventory_items - WHERE enterprise_id = #{sanitize enterprise.andand.id}) + WHERE enterprise_id = #{enterprise.andand.id}) AS o_inventory_items ON o_inventory_items.variant_id = spree_variants.id") .where("o_inventory_items.id IS NULL OR o_inventory_items.visible = (?)", true)