Remove 'draft' function from StockItem RUD endpoint

This commit is contained in:
Oliver Walters 2019-04-26 00:16:18 +10:00
parent 9ae5ea3876
commit 6c3041d99c
2 changed files with 1 additions and 14 deletions

View File

@ -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

View File

@ -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: