diff --git a/hb_server/apps/wpm/views.py b/hb_server/apps/wpm/views.py index 26d81e2..927ab17 100644 --- a/hb_server/apps/wpm/views.py +++ b/hb_server/apps/wpm/views.py @@ -551,12 +551,6 @@ class OperationMaterialInputViewSet(ListModelMixin, CreateModelMixin, DestroyMod if self.action == 'create': return OperationMaterialCreate1Serailizer return super().get_serializer_class() - - def create(self, request, *args, **kwargs): - instance = self.get_object() - if instance.operation.is_submited: - raise exceptions.APIException('该操作已提交') - return super().create(request, *args, **kwargs) @transaction.atomic() def destroy(self, request, *args, **kwargs): @@ -581,12 +575,6 @@ class OperationMaterialOutputViewSet(ListModelMixin, CreateModelMixin, DestroyMo if self.action == 'create': return OperationMaterialCreate2Serailizer return super().get_serializer_class() - - def create(self, request, *args, **kwargs): - instance = self.get_object() - if instance.operation.is_submited: - raise exceptions.APIException('该操作已提交') - return super().create(request, *args, **kwargs) @transaction.atomic() def destroy(self, request, *args, **kwargs): @@ -611,12 +599,6 @@ class OperationMaterialToolViewSet(ListModelMixin, CreateModelMixin, DestroyMode if self.action == 'create': return OperationMaterialCreate3Serializer return super().get_serializer_class() - - def create(self, request, *args, **kwargs): - instance = self.get_object() - if instance.operation.is_submited: - raise exceptions.APIException('该操作已提交') - return super().create(request, *args, **kwargs) @transaction.atomic() def destroy(self, request, *args, **kwargs):