File tree 2 files changed +0
-23
lines changed 2 files changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -585,19 +585,15 @@ def search_library(
585
585
elif extensions :
586
586
statement = statement .where (Entry .suffix .in_ (extensions ))
587
587
588
- statement = statement .options (
589
588
selectinload (Entry .text_fields ),
590
589
selectinload (Entry .datetime_fields ),
591
- selectinload (Entry .tags ).options (
592
590
selectinload (Tag .aliases ), selectinload (Tag .parent_tags )
593
591
),
594
592
)
595
593
596
594
statement = statement .distinct (Entry .id )
597
-
598
595
query_count = select (func .count ()).select_from (statement .alias ("entries" ))
599
596
count_all : int = session .execute (query_count ).scalar ()
600
-
601
597
statement = statement .limit (search .limit ).offset (search .offset )
602
598
603
599
logger .info (
Original file line number Diff line number Diff line change @@ -101,25 +101,6 @@ def test_tag_self_parent(library, generate_tag):
101
101
assert len (tag .parent_ids ) == 0
102
102
103
103
104
- def test_library_search (library , generate_tag , entry_full ):
105
- assert library .entries_count == 2
106
- tag = list (entry_full .tags )[0 ]
107
-
108
- results = library .search_library (
109
- FilterState .from_tag_name (tag .name ),
110
- )
111
-
112
- assert results .total_count == 1
113
- assert len (results ) == 1
114
-
115
- entry = results [0 ]
116
- assert {x .name for x in entry .tags } == {
117
- "foo" ,
118
- }
119
-
120
- assert entry .tags
121
-
122
-
123
104
def test_tag_search (library ):
124
105
tag = library .tags [0 ]
125
106
You can’t perform that action at this time.
0 commit comments