aboutsummaryrefslogtreecommitdiffstats
path: root/src/workflow
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2018-12-19 14:50:26 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-12-19 14:50:26 +0000
commitf344654fd14e972b1b443194201dfd4c19288809 (patch)
tree03ff022876fa1d0db78095701fcbd2cdf7f2e331 /src/workflow
parent04a974912c32eadd7f6dc5d462a8fe9f77fadcc4 (diff)
parent5310da6a3c243ec1769b1cbde3acd42c53669f85 (diff)
Merge "Force Lab Selection on POD Creation"
Diffstat (limited to 'src/workflow')
-rw-r--r--src/workflow/resource_bundle_workflow.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/workflow/resource_bundle_workflow.py b/src/workflow/resource_bundle_workflow.py
index 712c92b..11386f9 100644
--- a/src/workflow/resource_bundle_workflow.py
+++ b/src/workflow/resource_bundle_workflow.py
@@ -131,9 +131,12 @@ class Define_Hardware(WorkflowStep):
try:
self.form = HardwareDefinitionForm(request.POST)
if self.form.is_valid():
- self.update_models(self.form.cleaned_data)
- self.update_confirmation()
- self.metastep.set_valid("Step Completed")
+ if len(json.loads(self.form.cleaned_data['filter_field']).labs) != 1:
+ self.metastep.set_invalid("Please select one lab")
+ else:
+ self.update_models(self.form.cleaned_data)
+ self.update_confirmation()
+ self.metastep.set_valid("Step Completed")
else:
self.metastep.set_invalid("Please complete the fields highlighted in red to continue")
pass