Permalink
Browse files

Merge pull request #174 from gabrielhurley/tenant_name_fix

Fixes LP bug 875231 -- use tenant name instead of id for dropdown.
  • Loading branch information...
2 parents 65987c4 + 26d08f9 commit 0e08f4f92bed0a07102c77be12969a095aac5a2a @devcamcar devcamcar committed Oct 27, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 django-openstack/django_openstack/syspanel/views/users.py
@@ -47,7 +47,7 @@ class UserForm(forms.Form):
def __init__(self, *args, **kwargs):
tenant_list = kwargs.pop('tenant_list', None)
super(UserForm, self).__init__(*args, **kwargs)
- self.fields['tenant_id'].choices = [[tenant.id, tenant.id]
+ self.fields['tenant_id'].choices = [[tenant.id, tenant.name]
for tenant in tenant_list]
name = forms.CharField(label=_("Name"))
@@ -62,7 +62,7 @@ class UserUpdateForm(forms.Form):
def __init__(self, *args, **kwargs):
tenant_list = kwargs.pop('tenant_list', None)
super(UserUpdateForm, self).__init__(*args, **kwargs)
- self.fields['tenant_id'].choices = [[tenant.id, tenant.id]
+ self.fields['tenant_id'].choices = [[tenant.id, tenant.name]
for tenant in tenant_list]
id = forms.CharField(label=_("ID"),

0 comments on commit 0e08f4f

Please sign in to comment.