The Any Tag filter works on the Videos, Archives and Docs searches (#958)

The filter modal on these pages offered "Any Tag", but only the Files search
sent it; the module searches had no `any_tag` field.  Docs also matched any of
the listed tag_names, while every other search requires all of them.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
lrnselfreliance 2026-11-11 19:21:06 -07:00 • committed by GitHub
parent a0f30a0a60
commit 2800112f3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 189 additions and 30 deletions

View file

@ -1,6 +1,8 @@
import dataclasses
from typing import Optional
from wrolpi.errors import ValidationError
@dataclasses.dataclass
class DocSearchRequest:
@ -14,6 +16,11 @@ class DocSearchRequest:
limit: int = 20
offset: int = 0
deep: bool = False # When True, search all text including document contents (d_text)
any_tag: bool = False # When True, only Docs with at least one Tag.
def __post_init__(self):
if self.any_tag and self.tag_names:
raise ValidationError('Cannot use both tag_names and any_tag.')
@dataclasses.dataclass