Merge pull request #3485 from jumpserver/task_search

[Update] 修复任务列表页面无法搜索问题
pull/3486/head
BaiJiangJie 2019-12-04 10:42:38 +08:00 committed by GitHub
commit 98d3a36d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,8 @@ __all__ = [
class TaskViewSet(viewsets.ModelViewSet):
queryset = Task.objects.all()
filter_fields = ("name",)
search_fields = filter_fields
serializer_class = TaskSerializer
permission_classes = (IsOrgAdmin,)