Fix cannot delete user's email addresses in the identity/user panel

How to reproduce the bug:

P.S. Using the horizon master(pike) codebase

1) Login as an admin user
2) Click Identity and go to the Users panel
3) Create a user and put an email address with that user
4) Then edit this user to clear the email address.
5) Update the user and even though we have a green  banner(successful)
show up, the email address still viewable and do not disappear.

Closes Bug: #1573479

Change-Id: I0273d0c6d885c77f1f74bdc2ae6674d1e6539ac0
This commit is contained in:
Lucas H. Xu 2017-08-09 16:30:46 -04:00
parent 9603ee9f24
commit a9517ff615
2 changed files with 2 additions and 2 deletions
openstack_dashboard/dashboards/identity/users

@ -259,7 +259,7 @@ class UpdateUserForm(BaseUserForm, AddExtraColumnMixIn):
data.pop('description')
try:
if "email" in data:
data['email'] = data['email'] or None
data['email'] = data['email']
response = api.keystone.user_update(request, user, **data)
messages.success(request,
_('User has been updated successfully.'))

@ -500,7 +500,7 @@ class UsersViewTests(test.BaseAdminViewTests):
api.keystone.user_update(IsA(http.HttpRequest),
user.id,
email=user.email,
email=user.email or "",
name=user.name,
project=self.tenant.id).AndReturn(None)