From 0ec11d29ba2d524ff80b49ab8dc40f3f8cf3835b Mon Sep 17 00:00:00 2001 From: zadam Date: Sat, 18 Jan 2020 08:59:46 +0100 Subject: [PATCH] fix creating root calendar note when missing, #752 --- src/services/date_notes.js | 4 +++- src/services/ws.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/date_notes.js b/src/services/date_notes.js index d6b1a396b..c71ccb946 100644 --- a/src/services/date_notes.js +++ b/src/services/date_notes.js @@ -40,7 +40,9 @@ async function getRootCalendarNote() { parentNoteId: 'root', title: 'Calendar', target: 'into', - isProtected: false + isProtected: false, + type: 'text', + content: '' })).note; await attributeService.createLabel(rootNote.noteId, CALENDAR_ROOT_LABEL); diff --git a/src/services/ws.js b/src/services/ws.js index b4703dfc3..5eae3f0f7 100644 --- a/src/services/ws.js +++ b/src/services/ws.js @@ -71,7 +71,7 @@ function sendMessageToAllClients(message) { } } -async function fillInAdditionalProperties(sync) {throw new Error("AAA"); +async function fillInAdditionalProperties(sync) { // fill in some extra data needed by the frontend if (sync.entityName === 'attributes') { sync.noteId = await sql.getValue(`SELECT noteId