diff options
author | 2018-12-19 14:50:26 +0000 | |
---|---|---|
committer | 2018-12-19 14:50:26 +0000 | |
commit | 1a3b73723f8ed903e428b096fe5458980e813592 (patch) | |
tree | cd1463ce686123b7569d7bcc70d57725833c53c9 | |
parent | e04ff97b11ffe467a66c229728a90f374bce41dc (diff) | |
parent | 68c990f77d6053b61b3351bd48c67657b750d7dd (diff) |
Merge "Force Lab Selection on POD Creation"
-rw-r--r-- | dashboard/src/workflow/resource_bundle_workflow.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dashboard/src/workflow/resource_bundle_workflow.py b/dashboard/src/workflow/resource_bundle_workflow.py index 712c92b..11386f9 100644 --- a/dashboard/src/workflow/resource_bundle_workflow.py +++ b/dashboard/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 |