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:
Pierre-Alexandre Bardina 2016-09-05 16:16:29 +02:00
parent fa450723f9
commit 55a747db1b
1 changed files with 1 additions and 1 deletions

View File

@ -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