Only files that have been tagged will be returned when new 'Any' tag button is used to filter file search results.

This commit is contained in:
Roland 2024-07-22 16:36:57 -06:00
parent f3439c2bd5
commit 53d2402d32
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
31 changed files with 303 additions and 146 deletions

View file

@ -482,7 +482,7 @@ def search_archives(search_str: str, domain: str, limit: int, offset: int, order
if order in NO_NULL_ORDERS:
wheres.append(NO_NULL_ORDERS[order])
wheres, params = tag_append_sub_select_where(tag_names, wheres, params)
wheres, params = tag_append_sub_select_where(wheres, params, tag_names)
if search_str and headline:
headline = ''',

View file

@ -101,7 +101,7 @@ def search_videos(
# No search_str provided. Get id and total only.
select_columns = 'fg.id, COUNT(*) OVER() AS total'
wheres, params = tag_append_sub_select_where(tag_names, wheres, params)
wheres, params = tag_append_sub_select_where(wheres, params, tag_names)
if search_str and headline:
headline = ''',

View file

@ -99,3 +99,4 @@ class OutdatedZims:
class SearchEstimateRequest:
search_str: Optional[str] = None
tag_names: List[str] = field(default_factory=lambda: list())
any_tag: bool = False