Fix removing logs from tune
This commit is contained in:
parent
9a98499cbc
commit
648b578176
|
@ -263,13 +263,12 @@ const UploadPage = () => {
|
||||||
|
|
||||||
if (existingTune) {
|
if (existingTune) {
|
||||||
// clear old multi files first
|
// clear old multi files first
|
||||||
if (logFiles.length > 0 || toothLogFiles.length > 0) {
|
|
||||||
const tempFormData = new FormData();
|
const tempFormData = new FormData();
|
||||||
tempFormData.append('logFiles', '');
|
tempFormData.append('logFiles', '');
|
||||||
tempFormData.append('toothLogFiles', '');
|
tempFormData.append('toothLogFiles', '');
|
||||||
await updateTune(existingTune.id, tempFormData as unknown as TunesRecord);
|
await updateTune(existingTune.id, tempFormData as unknown as TunesRecord);
|
||||||
}
|
|
||||||
|
|
||||||
|
// another update with new files
|
||||||
await updateTune(existingTune.id, formData as unknown as TunesRecord);
|
await updateTune(existingTune.id, formData as unknown as TunesRecord);
|
||||||
} else {
|
} else {
|
||||||
await createTune(formData as unknown as TunesRecord);
|
await createTune(formData as unknown as TunesRecord);
|
||||||
|
|
Loading…
Reference in New Issue