updated files

This commit is contained in:
Alexander Karpov 2023-12-19 12:51:59 +03:00
parent 07640962fa
commit 8f19d51410
2 changed files with 6 additions and 3 deletions

View File

@ -13,6 +13,11 @@
from ..documents import FileDocument from ..documents import FileDocument
from .lema import lemmatize_and_remove_stopwords from .lema import lemmatize_and_remove_stopwords
"""
Calculus on types of searches:
https://new.akarpov.ru/files/FZUTFBIyfbdlDHVzxUNU
"""
class BaseSearch: class BaseSearch:
def __init__(self, queryset: QuerySet | None = None): def __init__(self, queryset: QuerySet | None = None):

View File

@ -92,9 +92,7 @@ def get_queryset(self):
): ):
return self.filter(BaseFileItem.objects.none()) return self.filter(BaseFileItem.objects.none())
return self.filter( return self.filter(
BaseFileItem.objects.cache().filter( BaseFileItem.objects.filter(user=self.request.user, parent__isnull=True)
user=self.request.user, parent__isnull=True
)
) )