diff --git a/InvenTree/InvenTree/serializers.py b/InvenTree/InvenTree/serializers.py index 57eddd53bd..ef4dd080fa 100644 --- a/InvenTree/InvenTree/serializers.py +++ b/InvenTree/InvenTree/serializers.py @@ -22,15 +22,3 @@ class UserSerializerBrief(serializers.ModelSerializer): 'pk', 'username', ] - - -class DraftRUDView(generics.RetrieveAPIView, generics.UpdateAPIView, generics.DestroyAPIView): - - def perform_update(self, serializer): - - ctx_data = serializer._context['request'].data - - if ctx_data.get('_is_final', False) in [True, u'true', u'True', 1]: - super(generics.UpdateAPIView, self).perform_update(serializer) - else: - pass diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py index 52edd2945e..215a9e311f 100644 --- a/InvenTree/stock/api.py +++ b/InvenTree/stock/api.py @@ -13,7 +13,6 @@ from .serializers import LocationSerializer from .serializers import StockTrackingSerializer from InvenTree.views import TreeSerializer -from InvenTree.serializers import DraftRUDView from rest_framework.serializers import ValidationError from rest_framework.views import APIView @@ -26,7 +25,7 @@ class StockCategoryTree(TreeSerializer): model = StockLocation -class StockDetail(DraftRUDView): +class StockDetail(generics.RetrieveUpdateDestroyAPIView): """ get: