We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88d0b47 commit 12b6b53Copy full SHA for 12b6b53
1 file changed
src/tagstudio/core/library/alchemy/library.py
@@ -1041,7 +1041,11 @@ def search_library(
1041
ast = search.ast
1042
1043
if not search.show_hidden_entries:
1044
- statement = statement.where(~Entry.tags.any(Tag.is_hidden))
+ hidden_tag_ids = select(Tag.id).where(Tag.is_hidden)
1045
+ hidden_entry_ids = select(TagEntry.entry_id).where(
1046
+ TagEntry.tag_id.in_(hidden_tag_ids)
1047
+ )
1048
+ statement = statement.where(Entry.id.not_in(hidden_entry_ids))
1049
1050
if ast:
1051
start_time = time.time()
0 commit comments