From 1b7762470d6d94b915c70efb561a7bc753b1becd Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 2 Jun 2019 11:14:56 +1000 Subject: [PATCH] catch a ValueError --- InvenTree/stock/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/InvenTree/stock/views.py b/InvenTree/stock/views.py index b233f53902..3114a8536d 100644 --- a/InvenTree/stock/views.py +++ b/InvenTree/stock/views.py @@ -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,