diff --git a/hb_server/apps/wpm/views.py b/hb_server/apps/wpm/views.py index 913712a..18f7577 100644 --- a/hb_server/apps/wpm/views.py +++ b/hb_server/apps/wpm/views.py @@ -1,6 +1,6 @@ from django.shortcuts import render from rest_framework.generics import CreateAPIView, GenericAPIView -from rest_framework.mixins import CreateModelMixin, ListModelMixin, RetrieveModelMixin +from rest_framework.mixins import CreateModelMixin, DestroyModelMixin, ListModelMixin, RetrieveModelMixin from rest_framework.utils import serializer_helpers from rest_framework.utils.field_mapping import get_relation_kwargs from rest_framework.views import APIView @@ -264,7 +264,7 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Gen 生产操作记录 """ perms_map={'*':'*'} - queryset = Operation.objects.select_related('step', 'material').all() + queryset = Operation.objects.select_related('step').all() serializer_class = OperationListSerializer filterset_fields = ['step', 'step__process', 'is_submited'] ordering_fields = ['id']