From f3ad0081b05611071d91f7cb50e44bad2c6d8f52 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Thu, 30 Jul 2015 18:46:18 +0800 Subject: [PATCH] User email no longer raises exceptions if missing Change-Id: Iec9b647781f335d6f933041377fc33b22bc264a2 Closes-Bug: #1479727 --- openstack_dashboard/dashboards/identity/users/tables.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/dashboards/identity/users/tables.py b/openstack_dashboard/dashboards/identity/users/tables.py index 2f9fda0daf..82f9b511b6 100644 --- a/openstack_dashboard/dashboards/identity/users/tables.py +++ b/openstack_dashboard/dashboards/identity/users/tables.py @@ -235,7 +235,8 @@ class UsersTable(tables.DataTable): widget=forms.Textarea(attrs={'rows': 4}), required=False), update_action=UpdateCell) - email = tables.Column('email', verbose_name=_('Email'), + email = tables.Column(lambda obj: getattr(obj, 'email', None), + verbose_name=_('Email'), form_field=forms.EmailField(required=False), update_action=UpdateCell, filters=(lambda v: defaultfilters