From 2bebf2d41a78ef5c8307f820c229104d007923ef Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 12 Jul 2021 20:00:50 +1000 Subject: [PATCH] Test fixes --- InvenTree/stock/api.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py index c7d92e0a7b..34314ac8c4 100644 --- a/InvenTree/stock/api.py +++ b/InvenTree/stock/api.py @@ -151,9 +151,6 @@ class StockAdjust(APIView): # List of validated items self.items = [] - # List of error messages - errors = [] - for entry in _items: if not type(entry) == dict: @@ -164,7 +161,7 @@ class StockAdjust(APIView): try: pk = int(pk) - except ValueError: + except (ValueError, TypeError): raise ValidationError(_('Each entry must contain a valid integer primary-key')) try: