fix label => attributes omissions

This commit is contained in:
azivner
2018-08-09 20:55:16 +02:00
parent ac25770c0e
commit 7ac109e7f7
3 changed files with 17 additions and 16 deletions

View File

@@ -7,10 +7,11 @@ async function runNotesWithLabel(runAttrValue) {
const notes = await repository.getEntities(`
SELECT notes.*
FROM notes
JOIN labels ON labels.noteId = notes.noteId
AND labels.isDeleted = 0
AND labels.name = 'run'
AND labels.value = ?
JOIN attributes ON attributes.noteId = notes.noteId
AND attributes.isDeleted = 0
AND attributes.type = 'label'
AND attributes.name = 'run'
AND attributes.value = ?
WHERE
notes.type = 'code'
AND notes.isDeleted = 0`, [runAttrValue]);