From 98c6a936584a1361c47993ab588995d8b4876348 Mon Sep 17 00:00:00 2001 From: xinwen Date: Tue, 16 Mar 2021 11:08:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=BB=E5=8A=A1=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E5=88=86=E7=BB=84=E7=BB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ops/api/adhoc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/ops/api/adhoc.py b/apps/ops/api/adhoc.py index 4845d49dc..f7b32e4fd 100644 --- a/apps/ops/api/adhoc.py +++ b/apps/ops/api/adhoc.py @@ -17,14 +17,16 @@ from ..serializers import ( AdHocDetailSerializer, ) from ..tasks import run_ansible_task +from orgs.mixins.api import OrgBulkModelViewSet +from orgs.utils import current_org __all__ = [ 'TaskViewSet', 'TaskRun', 'AdHocViewSet', 'AdHocRunHistoryViewSet' ] -class TaskViewSet(JMSBulkModelViewSet): - queryset = Task.objects.all() +class TaskViewSet(OrgBulkModelViewSet): + model = Task filterset_fields = ("name",) search_fields = filterset_fields serializer_class = TaskSerializer