2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 13:56:30 +00:00

Merge pull request from SchrodingersGat/stock-serial-fix

Stock serial fix
This commit is contained in:
Oliver
2021-01-18 16:50:54 +11:00
committed by GitHub

@ -1582,8 +1582,13 @@ class StockItemCreate(AjaxCreateView):
sn = str(sn).strip()
if len(sn) > 0:
try:
serials = extract_serial_numbers(sn, quantity)
except ValidationError as e:
serials = None
form.add_error('serial_numbers', e.messages)
if serials is not None:
existing = part.find_conflicting_serial_numbers(serials)
if len(existing) > 0: