summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openstack_dashboard/dashboards/project/instances/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/openstack_dashboard/dashboards/project/instances/views.py b/openstack_dashboard/dashboards/project/instances/views.py
index c1c3ae432..badf540b8 100644
--- a/openstack_dashboard/dashboards/project/instances/views.py
+++ b/openstack_dashboard/dashboards/project/instances/views.py
@@ -253,7 +253,8 @@ def _swap_filter(resources, search_opts, fake_field, real_field):
return True
filter_string = search_opts[fake_field]
matched = [resource for resource in resources
- if resource.name.lower() == filter_string.lower()]
+ if (resource.name is not None and
+ resource.name.lower() == filter_string.lower())]
if not matched:
return False
search_opts[real_field] = matched[0].id