Commit 8fb63c4f by Kálmán Viktor

dashboard: handle wrong port input

parent 2d45c53a
......@@ -279,8 +279,8 @@ class VmDetailView(CheckedDetailView):
error = None
host = Host.objects.get(pk=request.POST.get("host_pk"))
host.add_port(proto, private=port)
except Host.DoesNotExist:
error = _("Host not found!")
except ValueError:
error = _("There is a problem with your input!")
except Exception, e:
error = u', '.join(e.messages)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment