Fix optional group when creating service mapping
In service mapping / thresholds form, if I create a resource without a group, an error is raised. The patch fixes the problem. Change-Id: Icd408a38ca7863c8e214a3b8641ef2bb2062995f
This commit is contained in:
parent
fa450723f9
commit
55a747db1b
|
@ -72,7 +72,7 @@ class BaseForm(forms.SelfHandlingForm, common.OrderFieldsMixin):
|
|||
groups = api.cloudkittyclient(request).hashmap.groups.list()
|
||||
groups = api.identify(groups)
|
||||
choices = [(group.id, group.name) for group in groups]
|
||||
choices.insert(0, (None, ' '))
|
||||
choices.insert(0, ('', ' '))
|
||||
self.fields['group_id'].choices = choices
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue