diff options
author | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2020-07-15 13:00:53 -0700 |
---|---|---|
committer | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2020-07-15 13:00:53 -0700 |
commit | 4cc9426d72fe9baa8a4a7f56c6d43493bd011f02 (patch) | |
tree | ade06936c72c68b359b6a409bfebd7568c28eac0 /src/workflow | |
parent | 682f7ebb6d0be5ddd8e4c699e1f87fc20a3fe1e3 (diff) |
Fix Flake8 Violations
Several minor issues found through flake8 should now be fixed in the
code.
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Change-Id: I4f6e5dac5ed8378911598ded714602bbb3f6bd6b
Diffstat (limited to 'src/workflow')
-rw-r--r-- | src/workflow/resource_bundle_workflow.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/workflow/resource_bundle_workflow.py b/src/workflow/resource_bundle_workflow.py index 391d33e..fa05b22 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 @@ -251,15 +252,12 @@ class Define_Software(WorkflowStep): # TODO: fix headnode in form, currently doesn't return a selected one # models['headnode_index'] = post_data.get("headnode", 1) formset = self.create_hostformset(hosts, data=post_data) - has_headnode = False if formset.is_valid(): for i, form in enumerate(formset): host = hosts[i] image = form.cleaned_data['image'] hostname = form.cleaned_data['host_name'] headnode = form.cleaned_data['headnode'] - if headnode: - has_headnode = True host.is_head_node = headnode host.name = hostname host.image = image |