mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix form error for creating a new stock item
This commit is contained in:
parent
2991ce9317
commit
a7baad33ba
@ -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)
|
||||
|
||||
if serials is not None:
|
||||
existing = part.find_conflicting_serial_numbers(serials)
|
||||
|
||||
if len(existing) > 0:
|
||||
|
Loading…
Reference in New Issue
Block a user