fix some issues

This commit is contained in:
azivner
2018-08-22 14:40:49 +02:00
parent 09b610701d
commit 17348a9cfe
3 changed files with 11 additions and 2 deletions

View File

@@ -272,6 +272,13 @@ async function deleteNote(branch) {
attribute.isDeleted = true;
await attribute.save();
}
const targetAttributes = await repository.getEntities("SELECT * FROM attributes WHERE type = 'relation' AND isDeleted = 0 AND value = ?", [note.noteId]);
for (const attribute of targetAttributes) {
attribute.isDeleted = true;
await attribute.save();
}
}
}