diff --git a/openstack_dashboard/dashboards/identity/users/forms.py b/openstack_dashboard/dashboards/identity/users/forms.py index 1d2650e8ee..ca68ce3cd2 100644 --- a/openstack_dashboard/dashboards/identity/users/forms.py +++ b/openstack_dashboard/dashboards/identity/users/forms.py @@ -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.')) diff --git a/openstack_dashboard/dashboards/identity/users/tests.py b/openstack_dashboard/dashboards/identity/users/tests.py index 7702bfef41..5241de182d 100644 --- a/openstack_dashboard/dashboards/identity/users/tests.py +++ b/openstack_dashboard/dashboards/identity/users/tests.py @@ -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)