simplify call

This commit is contained in:
Matthias 2021-12-29 02:22:10 +01:00
parent 597d26d3d4
commit f8ce23217e
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -471,7 +471,7 @@ class StockList(generics.ListCreateAPIView):
if serial_numbers: if serial_numbers:
# If serial numbers are specified, check that they match! # If serial numbers are specified, check that they match!
try: try:
serials = extract_serial_numbers(serial_numbers, data['quantity']) serials = extract_serial_numbers(serial_numbers, quantity)
except DjangoValidationError as e: except DjangoValidationError as e:
raise ValidationError({ raise ValidationError({
'quantity': e.messages, 'quantity': e.messages,