2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-05 21:20:56 +00:00

Tests for stock serialization form

This commit is contained in:
Oliver Walters
2019-08-30 00:06:46 +10:00
parent 34bfdea4b5
commit 6f8c3454f3
2 changed files with 38 additions and 2 deletions

View File

@ -491,10 +491,10 @@ class StockItemSerialize(AjaxUpdateView):
item = self.get_object()
quantity = request.POST.get('quantity', None)
quantity = request.POST.get('quantity', 0)
serials = request.POST.get('serial_numbers', '')
dest_id = request.POST.get('destination', None)
notes = request.POST.get('note', None)
notes = request.POST.get('note', '')
user = request.user
valid = True
@ -509,6 +509,7 @@ class StockItemSerialize(AjaxUpdateView):
except ValidationError as e:
form.errors['serial_numbers'] = e.messages
valid = False
numbers = []
if valid:
try: