From 229e89af0335b60b6927459fae9f394cbc1a0f52 Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 31 Jan 2023 15:00:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BB=88=E7=AB=AF?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A0=B9=E6=8D=AE=E8=B4=9F=E8=BD=BD=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E8=BF=9B=E8=A1=8C=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/api/component/terminal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/terminal/api/component/terminal.py b/apps/terminal/api/component/terminal.py index e2e1ad22f..d877be1df 100644 --- a/apps/terminal/api/component/terminal.py +++ b/apps/terminal/api/component/terminal.py @@ -25,7 +25,7 @@ class TerminalViewSet(JMSBulkModelViewSet): queryset = Terminal.objects.filter(is_deleted=False) serializer_class = serializers.TerminalSerializer filterset_fields = ['name', 'remote_addr', 'type'] - custom_filter_fields = ['status'] + custom_filter_fields = ['load'] def destroy(self, request, *args, **kwargs): instance = self.get_object() @@ -40,7 +40,7 @@ class TerminalViewSet(JMSBulkModelViewSet): def filter_queryset(self, queryset): queryset = super().filter_queryset(queryset) - s = self.request.query_params.get('status') + s = self.request.query_params.get('load') if not s: return queryset filtered_queryset_id = [str(q.id) for q in queryset if q.load == s]