mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
This adds a data migration to fix those cases. It defaults to showing 1 unit of the specified weight. That is, if the user chose Kg, it'll display 1 as unit. Note that migration logs the process in a log/migrate.log file separate from the regular Rails log/production.log file. When you run the migration you'll see something like: Fixing variants missing unit_value... Processing variant 12... Succesfully fixed variant 12 Done! This helps auditing the changes applied and debug any possible failure scenarios. You can delete it once all is ok.