Kaynağa Gözat

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

DYaiu 4 yıl önce
ebeveyn
işleme
8e7776e072
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  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集