From 2b31cb28062426fd6a15b7aa514a05845b34db6e Mon Sep 17 00:00:00 2001 From: xinwen Date: Wed, 14 Apr 2021 17:24:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=91=BD=E4=BB=A4=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E9=80=82=E9=85=8D=20ES?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/api/command.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/terminal/api/command.py b/apps/terminal/api/command.py index d7868e4a0..814b2ecae 100644 --- a/apps/terminal/api/command.py +++ b/apps/terminal/api/command.py @@ -149,10 +149,8 @@ class CommandViewSet(viewsets.ModelViewSet): serializer = self.get_serializer(page, many=True) return self.get_paginated_response(serializer.data) - query_all = self.request.query_params.get('all', False) - if is_true(query_all): - # 适配像 ES 这种没有指定分页只返回少量数据的情况 - queryset = queryset[:] + # 适配像 ES 这种没有指定分页只返回少量数据的情况 + queryset = queryset[:] serializer = self.get_serializer(queryset, many=True) return Response(serializer.data) -- GitLab