mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
bd8c078fb9
@ -7,6 +7,7 @@ const noteService = require('./notes');
|
|||||||
const repository = require('./repository');
|
const repository = require('./repository');
|
||||||
const Branch = require('../entities/branch');
|
const Branch = require('../entities/branch');
|
||||||
const TaskContext = require("./task_context.js");
|
const TaskContext = require("./task_context.js");
|
||||||
|
const utils = require('./utils');
|
||||||
|
|
||||||
async function cloneNoteToParent(noteId, parentNoteId, prefix) {
|
async function cloneNoteToParent(noteId, parentNoteId, prefix) {
|
||||||
if (await isNoteDeleted(noteId) || await isNoteDeleted(parentNoteId)) {
|
if (await isNoteDeleted(noteId) || await isNoteDeleted(parentNoteId)) {
|
||||||
@ -54,7 +55,8 @@ async function ensureNoteIsAbsentFromParent(noteId, parentNoteId) {
|
|||||||
const branch = await repository.getEntity(`SELECT * FROM branches WHERE noteId = ? AND parentNoteId = ? AND isDeleted = 0`, [noteId, parentNoteId]);
|
const branch = await repository.getEntity(`SELECT * FROM branches WHERE noteId = ? AND parentNoteId = ? AND isDeleted = 0`, [noteId, parentNoteId]);
|
||||||
|
|
||||||
if (branch) {
|
if (branch) {
|
||||||
await noteService.deleteBranch(branch, new TaskContext());
|
const deleteId = utils.randomString(10);
|
||||||
|
await noteService.deleteBranch(branch, deleteId, new TaskContext());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user