mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
catch a ValueError
This commit is contained in:
parent
96f6f6068e
commit
1b7762470d
@ -251,12 +251,16 @@ class StockItemMoveMultiple(AjaxView, FormMixin):
|
||||
valid = False
|
||||
form.errors['confirm'] = [_('Confirm stock adjustment')]
|
||||
|
||||
destination = None
|
||||
destination_name = ""
|
||||
|
||||
try:
|
||||
destination = StockLocation.objects.get(id=form['destination'].value())
|
||||
destination_name = destination.pathstring
|
||||
except StockLocation.DoesNotExist:
|
||||
destination = None
|
||||
destination_name = ""
|
||||
pass
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
data = {
|
||||
'form_valid': valid,
|
||||
|
Loading…
Reference in New Issue
Block a user