Commit 8fb63c4f by Kálmán Viktor

dashboard: handle wrong port input

parent 2d45c53a
...@@ -279,8 +279,8 @@ class VmDetailView(CheckedDetailView): ...@@ -279,8 +279,8 @@ class VmDetailView(CheckedDetailView):
error = None error = None
host = Host.objects.get(pk=request.POST.get("host_pk")) host = Host.objects.get(pk=request.POST.get("host_pk"))
host.add_port(proto, private=port) host.add_port(proto, private=port)
except Host.DoesNotExist: except ValueError:
error = _("Host not found!") error = _("There is a problem with your input!")
except Exception, e: except Exception, e:
error = u', '.join(e.messages) 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