mealie-recipes / mealie

Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relevant data or add a family recipe with the UI editor
https://docs.mealie.io
GNU Affero General Public License v3.0
6.81k stars 700 forks source link

fix: Make Nextcloud Migrations Fault Tolerant #3544

Closed michael-genson closed 5 months ago

michael-genson commented 5 months ago

What type of PR is this?

(REQUIRED)

What this PR does / why we need it:

(REQUIRED)

Adds a try/except block in Nextcloud migrations to skip over individual failures. This also fixes nutrition data parsing as detailed in https://github.com/mealie-recipes/mealie/issues/3543 by ignoring empty nutrition values and coercing number values into strings.

Which issue(s) this PR fixes:

(REQUIRED)

Fixes https://github.com/mealie-recipes/mealie/issues/3543

Testing

(fill-in or delete this section)

Manually tested the .zip file provided in https://github.com/mealie-recipes/mealie/issues/3543 before (to confirm failure) and after (to confirm success).