From a8ab28ad13ab4803373b36bcb2203357b17a06f6 Mon Sep 17 00:00:00 2001 From: Emma Steimann Date: Thu, 15 Mar 2012 00:03:14 -0500 Subject: [PATCH] Added check to verify email exists when filtering users. * fixes bug 953809 Change-Id: Ib43c404bfc12ec4f6a0c8e47792fad01d1aaeec6 --- horizon/dashboards/syspanel/users/tables.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/horizon/dashboards/syspanel/users/tables.py b/horizon/dashboards/syspanel/users/tables.py index 4c813bb45..a27210e42 100644 --- a/horizon/dashboards/syspanel/users/tables.py +++ b/horizon/dashboards/syspanel/users/tables.py @@ -108,7 +108,8 @@ class UserFilterAction(tables.FilterAction): q = filter_string.lower() def comp(user): - if q in user.name.lower() or q in user.email.lower(): + if any([q in (user.name or "").lower(), + q in (user.email or "").lower()]): return True return False