mirror of
https://github.com/zadam/trilium.git
synced 2025-12-23 08:39:57 +01:00
implemented consistency checks
This commit is contained in:
@@ -188,7 +188,7 @@ async function checkCycle(parentNoteId, childNoteId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const parentNoteIds = await sql.getFlattenedResults("note_pid", "SELECT DISTINCT note_pid FROM notes_tree WHERE note_id = ?", [parentNoteId]);
|
||||
const parentNoteIds = await sql.getFlattenedResults("SELECT DISTINCT note_pid FROM notes_tree WHERE note_id = ?", [parentNoteId]);
|
||||
|
||||
for (const pid of parentNoteIds) {
|
||||
if (!await checkCycle(pid, childNoteId)) {
|
||||
|
||||
Reference in New Issue
Block a user