fix deleting / erasing note

This commit is contained in:
zadam
2022-09-21 23:58:54 +02:00
parent 15ed381f85
commit 0c196ae3a5
4 changed files with 13 additions and 10 deletions

View File

@@ -194,10 +194,15 @@ function deleteBranch(req) {
const taskContext = TaskContext.getInstance(req.query.taskId, 'delete-notes');
const deleteId = utils.randomString(10);
const noteDeleted = branch.deleteBranch(deleteId, taskContext);
let noteDeleted;
if (eraseNotes) {
// erase automatically means deleting all clones + note itself
branch.getNote().deleteNote(deleteId, taskContext);
noteService.eraseNotesWithDeleteId(deleteId);
noteDeleted = true;
} else {
noteDeleted = branch.deleteBranch(deleteId, taskContext);
}
if (last) {