From 1e57a78da71ed4b264044fffa2603145142bb882 Mon Sep 17 00:00:00 2001 From: Rob Cresswell Date: Wed, 11 Feb 2015 17:35:30 +0000 Subject: [PATCH] Adds default for resource_type_names in metadata This patch makes the resource_type_names default safely to an empty dict, rather than being error handled by the table Change-Id: Ic327b646e2db44375aad129139b355a9be44f126 Closes-Bug: 1420890 --- openstack_dashboard/dashboards/admin/metadata_defs/tables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstack_dashboard/dashboards/admin/metadata_defs/tables.py b/openstack_dashboard/dashboards/admin/metadata_defs/tables.py index eb5aac2cc2..7ce4db8573 100644 --- a/openstack_dashboard/dashboards/admin/metadata_defs/tables.py +++ b/openstack_dashboard/dashboards/admin/metadata_defs/tables.py @@ -133,7 +133,7 @@ class AdminNamespacesTable(tables.DataTable): form_field=forms.CharField(widget=forms.Textarea(), required=False), truncate=200) resource_type_names = tables.Column( - "resource_type_names", + lambda obj: getattr(obj, 'resource_type_names', []), verbose_name=_("Resource Types"), wrap_list=True, filters=(filters.unordered_list,))