diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2019-01-18 16:30:27 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-01-18 16:30:27 +0000 |
commit | 9fc7bfe1b88a720b381ef49bb98cc594924de605 (patch) | |
tree | d22b902a67a0cb9c9c6f49d0bfe05e390080e327 /src/workflow/forms.py | |
parent | 184dd8ad3a2e2b58f7d25ac6fa1e7ac80c1c5511 (diff) | |
parent | d8e2dbb57cc90ebdffb9ca463b91948b9b634918 (diff) |
Merge "Add Quick-Booking Workflow"
Diffstat (limited to 'src/workflow/forms.py')
-rw-r--r-- | src/workflow/forms.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/workflow/forms.py b/src/workflow/forms.py index f781663..b8c7f66 100644 --- a/src/workflow/forms.py +++ b/src/workflow/forms.py @@ -330,7 +330,7 @@ class MultipleSelectFilterField(forms.Field): class FormUtils: @staticmethod - def getLabData(): + def getLabData(multiple_selectable_hosts): """ Gets all labs and thier host profiles and returns a serialized version the form can understand. Should be rewritten with a related query to make it faster @@ -361,7 +361,7 @@ class FormUtils: shost['selected'] = 0 shost['selectable'] = 1 shost['follow'] = 0 - shost['multiple'] = 1 + shost['multiple'] = multiple_selectable_hosts items[shost['id']] = shost mapping[slab['id']].append(shost['id']) if shost['id'] not in mapping: @@ -374,7 +374,7 @@ class FormUtils: context = { 'filter_objects': filter_objects, 'mapping': mapping, - 'items': items + 'filter_items': items } return context @@ -384,7 +384,7 @@ class HardwareDefinitionForm(forms.Form): def __init__(self, *args, **kwargs): selection_data = kwargs.pop("selection_data", False) super(HardwareDefinitionForm, self).__init__(*args, **kwargs) - attrs = FormUtils.getLabData() + attrs = FormUtils.getLabData(1) attrs['selection_data'] = selection_data self.fields['filter_field'] = MultipleSelectFilterField( widget=MultipleSelectFilterWidget( |