User email is optional and can be absent

Change-Id: Idff0f7c33bcaee29c7d1e7be415eb6b5b29b5b1a
Related-Bug: #1260423
This commit is contained in:
Dirk Mueller 2013-12-18 11:28:37 +01:00
parent 859f8cfe7e
commit 19566878b2
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ class UserFilterAction(tables.FilterAction):
q = filter_string.lower()
return [user for user in users
if q in user.name.lower()
or q in user.email.lower()]
or q in getattr(user, 'email', '').lower()]
class RemoveMembers(tables.DeleteAction):

View File

@ -119,7 +119,7 @@ class UserFilterAction(tables.FilterAction):
q = filter_string.lower()
return [user for user in users
if q in user.name.lower()
or q in user.email.lower()]
or q in getattr(user, 'email', '').lower()]
class UsersTable(tables.DataTable):