fix: 任务应该分组织

pull/5763/head
xinwen 4 years ago committed by 老广
parent adc607dafe
commit 98c6a93658

@ -17,14 +17,16 @@ from ..serializers import (
AdHocDetailSerializer, AdHocDetailSerializer,
) )
from ..tasks import run_ansible_task from ..tasks import run_ansible_task
from orgs.mixins.api import OrgBulkModelViewSet
from orgs.utils import current_org
__all__ = [ __all__ = [
'TaskViewSet', 'TaskRun', 'AdHocViewSet', 'AdHocRunHistoryViewSet' 'TaskViewSet', 'TaskRun', 'AdHocViewSet', 'AdHocRunHistoryViewSet'
] ]
class TaskViewSet(JMSBulkModelViewSet): class TaskViewSet(OrgBulkModelViewSet):
queryset = Task.objects.all() model = Task
filterset_fields = ("name",) filterset_fields = ("name",)
search_fields = filterset_fields search_fields = filterset_fields
serializer_class = TaskSerializer serializer_class = TaskSerializer

Loading…
Cancel
Save