fix search by attributes was finding also deleted attributes

pull/255/head
azivner 2018-08-13 11:06:17 +07:00
parent cd9eef32b0
commit ce5c385c15
1 changed files with 1 additions and 1 deletions

@ -7,7 +7,7 @@ module.exports = function(attributeFilters) {
let i = 1;
for (const filter of attributeFilters) {
joins.push(`LEFT JOIN attributes AS attribute${i} ON attribute${i}.noteId = notes.noteId AND attribute${i}.name = ?`);
joins.push(`LEFT JOIN attributes AS attribute${i} ON attribute${i}.noteId = notes.noteId AND attribute${i}.name = ? AND attribute${i}.isDeleted = 0`);
joinParams.push(filter.name);
where += " " + filter.relation + " ";