diff --git a/src/becca/entities/note.js b/src/becca/entities/note.js index 00140a7d1..3a994a507 100644 --- a/src/becca/entities/note.js +++ b/src/becca/entities/note.js @@ -1358,7 +1358,7 @@ class Note extends AbstractEntity { } isOptions() { - return this.noteId.startsWith("options"); + return this.noteId.startsWith("_options"); } get isDeleted() { diff --git a/src/services/notes.js b/src/services/notes.js index 95dff2ec3..813e75bc6 100644 --- a/src/services/notes.js +++ b/src/services/notes.js @@ -108,8 +108,13 @@ function getAndValidateParent(params) { throw new ValidationError(`Only 'launcher' notes can be created in parent '${params.parentNoteId}'`); } - if (!params.ignoreForbiddenParents && (['_lbRoot', '_hidden'].includes(parentNote.noteId) || parentNote.isOptions())) { - throw new ValidationError(`Creating child notes into '${parentNote.noteId}' is not allowed.`); + if (!params.ignoreForbiddenParents) { + if (['_lbRoot', '_hidden'].includes(parentNote.noteId) + || parentNote.noteId.startsWith("_lbTpl") + || parentNote.isOptions()) { + + throw new ValidationError(`Creating child notes into '${parentNote.noteId}' is not allowed.`); + } } return parentNote;