mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
fix consistency checks
This commit is contained in:
@@ -259,7 +259,7 @@ class ConsistencyChecks {
|
||||
WHERE noteId = ?
|
||||
and parentNoteId = ?
|
||||
and isDeleted = 0
|
||||
ORDER BY utcDateCreated`, [noteId, parentNoteId]);
|
||||
ORDER BY utcDateModified`, [noteId, parentNoteId]);
|
||||
|
||||
const branches = branchIds.map(branchId => becca.getBranch(branchId));
|
||||
|
||||
|
||||
@@ -240,6 +240,7 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
|
||||
}
|
||||
|
||||
if (noteMeta && noteMeta.isClone) {
|
||||
if (!becca.getBranchFromChildAndParent(noteId, parentNoteId)) {
|
||||
new Branch({
|
||||
noteId,
|
||||
parentNoteId,
|
||||
@@ -247,6 +248,7 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
|
||||
prefix: noteMeta.prefix,
|
||||
notePosition: noteMeta.notePosition
|
||||
}).save();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -366,6 +368,7 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
|
||||
|
||||
note.setContent(content);
|
||||
|
||||
if (!becca.getBranchFromChildAndParent(noteId, parentNoteId)) {
|
||||
new Branch({
|
||||
noteId,
|
||||
parentNoteId,
|
||||
@@ -374,6 +377,7 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
|
||||
notePosition: noteMeta.notePosition
|
||||
}).save();
|
||||
}
|
||||
}
|
||||
else {
|
||||
({note} = noteService.createNewNote({
|
||||
parentNoteId: parentNoteId,
|
||||
|
||||
Reference in New Issue
Block a user