[fix] delete picture of drink

This commit is contained in:
Tim Gröger 2021-11-12 12:01:31 +01:00
parent 023127f8be
commit ad7ab825c8
1 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,7 @@
:columns="columns"
:rows="drinks"
dense
row-key="id"
:filter="search"
:filter-method="filter"
grid
@ -460,6 +461,9 @@ export default defineComponent({
for (const volume of toDeleteObjects.volumes) {
await store.deleteVolume(volume, drink);
}
if (deletePic) {
await deletePicture();
}
if (drink.id > 0) {
await store.updateDrink(drink);
} else {
@ -468,9 +472,6 @@ export default defineComponent({
editDrink.value.id = _drink.id;
}
}
if (deletePic) {
await deletePicture();
}
if (drinkPic instanceof File) {
await savePicture(drinkPic);
}