From: Sawyer Bergeron Date: Thu, 30 Jul 2020 16:12:19 +0000 (-0400) Subject: Allow marker bookings X-Git-Tag: 2.0.99~13^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F11%2F70611%2F1;p=laas.git Allow marker bookings Signed-off-by: Sawyer Bergeron Change-Id: I7494242760e98e8dd07db1f952c51e30897a2df8 --- diff --git a/src/workflow/resource_bundle_workflow.py b/src/workflow/resource_bundle_workflow.py index 1a6de50..404224e 100644 --- a/src/workflow/resource_bundle_workflow.py +++ b/src/workflow/resource_bundle_workflow.py @@ -259,14 +259,14 @@ class Define_Software(WorkflowStep): image = form.cleaned_data['image'] hostname = form.cleaned_data['host_name'] headnode = form.cleaned_data['headnode'] - if headnode or not hosts: + if headnode: has_headnode = True host.is_head_node = headnode host.name = hostname host.image = image host.save() - if not has_headnode: + if not has_headnode and len(hosts) > 0: self.set_invalid("No headnode. Please set a headnode.") return