diff --git a/test_server/question/views.py b/test_server/question/views.py index 8f02a1d..642b10d 100644 --- a/test_server/question/views.py +++ b/test_server/question/views.py @@ -226,7 +226,7 @@ class QuestionViewSet(ModelViewSet): class ExerciseView(APIView): def post(self, request): questioncat = request.data['questioncat'] - queryset = Question.objects.filter(is_delete=0,questioncat=questioncat).order_by('id') + queryset = Question.objects.filter(is_delete=0,questioncat=questioncat).order_by('type') if 'ydtms' in request.data and request.data['ydtms']: queryset = queryset.exclude(id__in = request.data['ydtms']) count = queryset.count()