aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSean Smith <ssmith@iol.unh.edu>2020-07-24 15:20:02 -0400
committerSean Smith <ssmith@iol.unh.edu>2020-07-24 15:21:37 -0400
commitb743f3ad85acca17c473d123f715091165969087 (patch)
treeee0eea79f3ac1917e032ebf814ed6166dd1bbe29 /src
parentf4ebbfd80d6154bba53a6d5ad20cd2cfffcd4f2f (diff)
Enforce head in Design a Pod
Change-Id: Ibd9858750e4529450483c66907061440dc8389f3 Signed-off-by: Sean Smith <ssmith@iol.unh.edu>
Diffstat (limited to 'src')
-rw-r--r--src/workflow/resource_bundle_workflow.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/workflow/resource_bundle_workflow.py b/src/workflow/resource_bundle_workflow.py
index 391d33e..639e7a8 100644
--- a/src/workflow/resource_bundle_workflow.py
+++ b/src/workflow/resource_bundle_workflow.py
@@ -10,6 +10,7 @@
from django.conf import settings
from django.forms import formset_factory
+from django.core.exceptions import ValidationError
from typing import List
@@ -265,6 +266,10 @@ class Define_Software(WorkflowStep):
host.image = image
host.save()
+ if not has_headnode:
+ self.set_invalid("No headnode. Please set a headnode.")
+ return
+
self.set_valid("Completed")
else:
self.set_invalid("Please complete all fields")