aboutsummaryrefslogtreecommitdiffstats
path: root/src/booking
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2021-03-30 18:01:05 +0000
committerGerrit Code Review <gerrit@opnfv.org>2021-03-30 18:01:05 +0000
commitf1456220fcc098cb0f5e9fc60124680ff8aba6af (patch)
tree0bf25028c40a0fc3dd49026f79e7dd4b13ca8df3 /src/booking
parent6366b1776bc51c29d4ba4c256f51d16acc52d871 (diff)
parent3abc7dcc9603cf978e5b7c2762e80998a4a6eef5 (diff)
Merge "Hostname not required"
Diffstat (limited to 'src/booking')
-rw-r--r--src/booking/forms.py2
-rw-r--r--src/booking/quick_deployer.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/booking/forms.py b/src/booking/forms.py
index 19c0c85..e7be70f 100644
--- a/src/booking/forms.py
+++ b/src/booking/forms.py
@@ -21,7 +21,7 @@ from booking.lib import get_user_items, get_user_field_opts
class QuickBookingForm(forms.Form):
purpose = forms.CharField(max_length=1000)
project = forms.CharField(max_length=400)
- hostname = forms.CharField(max_length=400)
+ hostname = forms.CharField(required=False, max_length=400)
installer = forms.ModelChoiceField(queryset=Installer.objects.all(), required=False)
scenario = forms.ModelChoiceField(queryset=Scenario.objects.all(), required=False)
diff --git a/src/booking/quick_deployer.py b/src/booking/quick_deployer.py
index 7865ee4..0a3bfc6 100644
--- a/src/booking/quick_deployer.py
+++ b/src/booking/quick_deployer.py
@@ -205,7 +205,7 @@ def create_from_form(form, request):
purpose_field = form.cleaned_data['purpose']
project_field = form.cleaned_data['project']
users_field = form.cleaned_data['users']
- hostname = form.cleaned_data['hostname']
+ hostname = 'opnfv_host' if not form.cleaned_data['hostname'] else form.cleaned_data['hostname']
length = form.cleaned_data['length']
image = form.cleaned_data['image']