added some consistency checks for links and attributes

This commit is contained in:
azivner
2018-11-15 13:58:14 +01:00
parent 346b8c21dd
commit 6749cbed1b
36 changed files with 244 additions and 47 deletions

View File

@@ -332,9 +332,19 @@ async function deleteNote(branch) {
await attribute.save();
}
for (const attribute of await note.getTargetRelations()) {
attribute.isDeleted = true;
await attribute.save();
for (const relation of await note.getTargetRelations()) {
relation.isDeleted = true;
await relation.save();
}
for (const link of await note.getLinks()) {
link.isDeleted = true;
await link.save();
}
for (const link of await note.getTargetLinks()) {
link.isDeleted = true;
await link.save();
}
}
}