Explorar o código

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

DYaiu %!s(int64=4) %!d(string=hai) anos
pai
achega
8e7776e072
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  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集