fix consistency check

This commit is contained in:
zadam 2019-02-03 16:22:45 +01:00
parent 6cc0dd5a80
commit 42112b8053
2 changed files with 2 additions and 2 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "trilium", "name": "trilium",
"version": "0.28.3", "version": "0.29.0-beta",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -109,7 +109,7 @@ async function findBrokenReferenceIssues() {
// empty targetNoteId for relations is a special fixable case so not covered here // empty targetNoteId for relations is a special fixable case so not covered here
await findIssues(` await findIssues(`
SELECT attributeId, attributes.noteId SELECT attributeId, attributes.value AS noteId
FROM attributes LEFT JOIN notes ON notes.noteId = attributes.value FROM attributes LEFT JOIN notes ON notes.noteId = attributes.value
WHERE attributes.type = 'relation' AND attributes.value != '' AND notes.noteId IS NULL`, WHERE attributes.type = 'relation' AND attributes.value != '' AND notes.noteId IS NULL`,
({attributeId, noteId}) => `Relation ${attributeId} references missing note ${noteId}`); ({attributeId, noteId}) => `Relation ${attributeId} references missing note ${noteId}`);