mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-04-27 11:12:54 +00:00
perf: es search
This commit is contained in:
parent
eaa390fd6f
commit
0131eaa6db
@ -128,7 +128,7 @@ class QuerySetMixin:
|
||||
def paginate_queryset(self, queryset):
|
||||
page = super().paginate_queryset(queryset)
|
||||
model = getattr(queryset, 'model', None)
|
||||
if not model or not hasattr(model, 'objects'):
|
||||
if not model or hasattr(queryset, 'custom'):
|
||||
return page
|
||||
|
||||
serializer_class = self.get_serializer_class()
|
||||
|
@ -386,6 +386,7 @@ class ES(object):
|
||||
|
||||
|
||||
class QuerySet(DJQuerySet):
|
||||
custom = True
|
||||
default_days_ago = 7
|
||||
max_result_window = 10000
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user