spree/spree — pull request #4204 by binaryphile (2014-01-15 17:19:43+00:00)
Title: Add exceptions for nil records in tax categories migration

A number of people have experienced migration failures upgrading on this migration.

See #3534 and #3604.

While those issues have been closed by commits, some such as myself still experience this failure.

The patch below is cribbed from https://gist.github.com/Lordnibbler/6255113. This fix works for me and for anyone with nil line_items and associated properties.

The fix expands the number of people who will successfully be able to migrate, introduces no compatibility issues for those not experiencing the problem, and will not harm those who have already successfully run this migration (they aren't missing out on anything here). Therefore I suggest it be accepted so as to ensure greater adoption of Spree 2.1.

Thanks.