mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix consistency checks
This commit is contained in:
parent
8366a94bde
commit
b8fe9a41db
@ -259,7 +259,7 @@ class ConsistencyChecks {
|
|||||||
WHERE noteId = ?
|
WHERE noteId = ?
|
||||||
and parentNoteId = ?
|
and parentNoteId = ?
|
||||||
and isDeleted = 0
|
and isDeleted = 0
|
||||||
ORDER BY utcDateCreated`, [noteId, parentNoteId]);
|
ORDER BY utcDateModified`, [noteId, parentNoteId]);
|
||||||
|
|
||||||
const branches = branchIds.map(branchId => becca.getBranch(branchId));
|
const branches = branchIds.map(branchId => becca.getBranch(branchId));
|
||||||
|
|
||||||
|
@ -240,13 +240,15 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (noteMeta && noteMeta.isClone) {
|
if (noteMeta && noteMeta.isClone) {
|
||||||
new Branch({
|
if (!becca.getBranchFromChildAndParent(noteId, parentNoteId)) {
|
||||||
noteId,
|
new Branch({
|
||||||
parentNoteId,
|
noteId,
|
||||||
isExpanded: noteMeta.isExpanded,
|
parentNoteId,
|
||||||
prefix: noteMeta.prefix,
|
isExpanded: noteMeta.isExpanded,
|
||||||
notePosition: noteMeta.notePosition
|
prefix: noteMeta.prefix,
|
||||||
}).save();
|
notePosition: noteMeta.notePosition
|
||||||
|
}).save();
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -366,13 +368,15 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
|
|||||||
|
|
||||||
note.setContent(content);
|
note.setContent(content);
|
||||||
|
|
||||||
new Branch({
|
if (!becca.getBranchFromChildAndParent(noteId, parentNoteId)) {
|
||||||
noteId,
|
new Branch({
|
||||||
parentNoteId,
|
noteId,
|
||||||
isExpanded: noteMeta.isExpanded,
|
parentNoteId,
|
||||||
prefix: noteMeta.prefix,
|
isExpanded: noteMeta.isExpanded,
|
||||||
notePosition: noteMeta.notePosition
|
prefix: noteMeta.prefix,
|
||||||
}).save();
|
notePosition: noteMeta.notePosition
|
||||||
|
}).save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
({note} = noteService.createNewNote({
|
({note} = noteService.createNewNote({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user