mirror of
https://github.com/zadam/trilium.git
synced 2025-01-15 11:39:37 +08:00
fix consistency checks
This commit is contained in:
parent
8366a94bde
commit
b8fe9a41db
2 changed files with 19 additions and 15 deletions
|
@ -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,13 +240,15 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
|
|||
}
|
||||
|
||||
if (noteMeta && noteMeta.isClone) {
|
||||
new Branch({
|
||||
noteId,
|
||||
parentNoteId,
|
||||
isExpanded: noteMeta.isExpanded,
|
||||
prefix: noteMeta.prefix,
|
||||
notePosition: noteMeta.notePosition
|
||||
}).save();
|
||||
if (!becca.getBranchFromChildAndParent(noteId, parentNoteId)) {
|
||||
new Branch({
|
||||
noteId,
|
||||
parentNoteId,
|
||||
isExpanded: noteMeta.isExpanded,
|
||||
prefix: noteMeta.prefix,
|
||||
notePosition: noteMeta.notePosition
|
||||
}).save();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -366,13 +368,15 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
|
|||
|
||||
note.setContent(content);
|
||||
|
||||
new Branch({
|
||||
noteId,
|
||||
parentNoteId,
|
||||
isExpanded: noteMeta.isExpanded,
|
||||
prefix: noteMeta.prefix,
|
||||
notePosition: noteMeta.notePosition
|
||||
}).save();
|
||||
if (!becca.getBranchFromChildAndParent(noteId, parentNoteId)) {
|
||||
new Branch({
|
||||
noteId,
|
||||
parentNoteId,
|
||||
isExpanded: noteMeta.isExpanded,
|
||||
prefix: noteMeta.prefix,
|
||||
notePosition: noteMeta.notePosition
|
||||
}).save();
|
||||
}
|
||||
}
|
||||
else {
|
||||
({note} = noteService.createNewNote({
|
||||
|
|
Loading…
Reference in a new issue