diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py index 9961bb7bae..d69c94b4a8 100644 --- a/InvenTree/stock/api.py +++ b/InvenTree/stock/api.py @@ -471,7 +471,7 @@ class StockList(generics.ListCreateAPIView): if serial_numbers: # If serial numbers are specified, check that they match! try: - serials = extract_serial_numbers(serial_numbers, data['quantity']) + serials = extract_serial_numbers(serial_numbers, quantity) except DjangoValidationError as e: raise ValidationError({ 'quantity': e.messages,