Skip to content

Commit

Permalink
Fixed #425: the "Tags - Not contains - No tags" search query to find …
Browse files Browse the repository at this point in the history
…all images with tags
  • Loading branch information
RvanderLaan committed Mar 5, 2022
1 parent c8a62e8 commit 3681aaf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/frontend/containers/AdvancedSearch/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,7 @@ export function intoCriteria(query: Criteria, tagStore: TagStore): FileSearchCri
return new ClientNumberSearchCriteria(query.key, query.value * BYTES_IN_MB, query.operator);
} else if (query.key === 'tags') {
const tag = query.value !== undefined ? tagStore.get(query.value) : undefined;
if (tag !== undefined) {
return new ClientTagSearchCriteria('tags', tag.id, query.operator);
} else {
return new ClientTagSearchCriteria('tags');
}
return new ClientTagSearchCriteria('tags', tag?.id, query.operator);
} else {
return new ClientTagSearchCriteria('tags');
}
Expand Down

0 comments on commit 3681aaf

Please sign in to comment.