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