From 7ed526beb7fbff9827d153780dcf819e1f88e910 Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 8 Dec 2019 09:41:31 +0100 Subject: [PATCH] fix clipper, closes #752 --- src/entities/note.js | 1 + src/routes/api/clipper.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/entities/note.js b/src/entities/note.js index 1c1903dd4..20ce506b2 100644 --- a/src/entities/note.js +++ b/src/entities/note.js @@ -931,6 +931,7 @@ class Note extends Entity { delete pojo.isContentAvailable; delete pojo.__attributeCache; + delete pojo.__ownedAttributeCache; delete pojo.content; /** zero references to contentHash, probably can be removed */ delete pojo.contentHash; diff --git a/src/routes/api/clipper.js b/src/routes/api/clipper.js index 1554941c3..8659f6561 100644 --- a/src/routes/api/clipper.js +++ b/src/routes/api/clipper.js @@ -34,7 +34,8 @@ async function addClipping(req) { clippingNote = (await noteService.createNewNote({ parentNoteId: todayNote.noteId, title: title, - content: '' + content: '', + type: 'text' })).note; await clippingNote.setLabel('clipType', 'clippings'); @@ -58,7 +59,8 @@ async function createNote(req) { const {note} = await noteService.createNewNote({ parentNoteId: todayNote.noteId, title, - content + content, + type: 'text' }); await note.setLabel('clipType', clipType);