diff --git a/src/services/consistency_checks.js b/src/services/consistency_checks.js index e459b83ac..b79c69d4b 100644 --- a/src/services/consistency_checks.js +++ b/src/services/consistency_checks.js @@ -209,6 +209,16 @@ async function runAllChecks() { AND type != 'relation-map'`, "Note has invalid type", errorList); + await runCheck(` + SELECT + noteId + FROM + notes + WHERE + isDeleted = 0 + AND content IS NULL`, + "Note content is null even though it is not deleted", errorList); + await runCheck(` SELECT parentNoteId diff --git a/src/services/notes.js b/src/services/notes.js index 5323a3232..a4afa98a7 100644 --- a/src/services/notes.js +++ b/src/services/notes.js @@ -219,7 +219,7 @@ function findRelationMapLinks(content, foundLinks) { async function saveLinks(note, content) { if (note.type !== 'text' && note.type !== 'relation-map') { - return; + return content; } const foundLinks = [];