mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Test fixes
This commit is contained in:
parent
11ee8e8369
commit
2bebf2d41a
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user