fix attr detail related notes

This commit is contained in:
zadam
2020-09-13 22:23:03 +02:00
parent 5e11806110
commit 04c93d6736
3 changed files with 17 additions and 2 deletions

View File

@@ -119,8 +119,14 @@ async function searchFromRelation(note, relationName) {
function getRelatedNotes(req) {
const attr = req.body;
const matchingNameAndValue = searchService.searchNotes(formatAttrForSearch(attr, true));
const matchingName = searchService.searchNotes(formatAttrForSearch(attr, false));
const searchSettings = {
includeNoteContent: false,
excludeArchived: true,
fuzzyAttributeSearch: false
};
const matchingNameAndValue = searchService.findNotesWithQuery(formatAttrForSearch(attr, true), new SearchContext(searchSettings));
const matchingName = searchService.findNotesWithQuery(formatAttrForSearch(attr, false), new SearchContext(searchSettings));
const results = [];