소스 검색

修复DeptJobUserView的查询源和序列化对象

DYaiu 4 년 전
부모
커밋
8e7776e072
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      treeAndTable/views.py

+ 3 - 3
treeAndTable/views.py

@@ -7,7 +7,7 @@ from rest_framework.response import Response
 from rest_framework.views import APIView
 from rest_framework.viewsets import ModelViewSet
 from treeAndTable.models import Department, Dept_job, Job, Dept_job_user
-from treeAndTable.serializer import Dept_Job_Serializer
+from treeAndTable.serializer import Dept_Job_Serializer, DeptJobUserSerializer
 
 
 class DepartmentView(APIView):
@@ -127,8 +127,8 @@ class DeptAndJobView(ModelViewSet):
 
 
 class DeptJobUserView(ModelViewSet):
-    queryset = Dept_job.objects.all()
-    serializer_class = Dept_Job_Serializer
+    queryset = Dept_job_user.objects.all()
+    serializer_class = DeptJobUserSerializer
 
     '''
     仅支持list类型的部门岗位id集