mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
This fixes the RuntimeError we get when accessing deleted variants due to the variant being nil. https://github.com/rails/rails/issues/11036 is still an open Rails bug, as some people mention in https://github.com/rails/rails/pull/21550. The issue is that `includes` doesn't respect `unscoped`. I found a potential solution for the entire app in https://github.com/rails/rails/issues/11036#issuecomment-302133116 but our friend @markets has a gem, https://github.com/markets/unscoped_associations, that solves that too.