Test fixes

This commit is contained in:
Oliver 2021-07-12 20:00:50 +10:00
parent 11ee8e8369
commit 2bebf2d41a

View File

@ -151,9 +151,6 @@ class StockAdjust(APIView):
# List of validated items # List of validated items
self.items = [] self.items = []
# List of error messages
errors = []
for entry in _items: for entry in _items:
if not type(entry) == dict: if not type(entry) == dict:
@ -164,7 +161,7 @@ class StockAdjust(APIView):
try: try:
pk = int(pk) pk = int(pk)
except ValueError: except (ValueError, TypeError):
raise ValidationError(_('Each entry must contain a valid integer primary-key')) raise ValidationError(_('Each entry must contain a valid integer primary-key'))
try: try: