fixed empty fields breaking recipe update

This commit is contained in:
vabene1111
2021-12-15 17:45:53 +01:00
parent edde015b71
commit 2559905a78

View File

@ -623,6 +623,10 @@ export default {
this.sortIngredients(s)
}
if (this.recipe.waiting_time === ''){ this.recipe.waiting_time = 0}
if (this.recipe.working_time === ''){ this.recipe.working_time = 0}
if (this.recipe.servings === ''){ this.recipe.servings = 0}
apiFactory.updateRecipe(this.recipe_id, this.recipe,
{}).then((response) => {
console.log(response)