From 42112b80538effd70cc8294d2709202a89f263e2 Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 3 Feb 2019 16:22:45 +0100 Subject: [PATCH] fix consistency check --- package-lock.json | 2 +- src/services/consistency_checks.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 42e29e6dd..72968a589 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "trilium", - "version": "0.28.3", + "version": "0.29.0-beta", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/services/consistency_checks.js b/src/services/consistency_checks.js index d4bc19fd2..d8eadd78c 100644 --- a/src/services/consistency_checks.js +++ b/src/services/consistency_checks.js @@ -109,7 +109,7 @@ async function findBrokenReferenceIssues() { // empty targetNoteId for relations is a special fixable case so not covered here await findIssues(` - SELECT attributeId, attributes.noteId + SELECT attributeId, attributes.value AS noteId FROM attributes LEFT JOIN notes ON notes.noteId = attributes.value WHERE attributes.type = 'relation' AND attributes.value != '' AND notes.noteId IS NULL`, ({attributeId, noteId}) => `Relation ${attributeId} references missing note ${noteId}`);