spree/spree — pull request #5594 by metade (2014-11-11 11:43:19+00:00)
Title: Fix inefficient query in create item adjustments

We found a very big problem on our production site with the query in `CreateItemAdjustments`.

Due to a promotion we apply on every order, the query to find adjustments that had already been applied was doing a `id NOT IN (?)"` with all the completed line items in our store!