Merge "Fix volumes no attribute tenant_name error"

This commit is contained in:
Jenkins 2016-01-04 09:38:43 +00:00 committed by Gerrit Code Review
commit 5ce3017c83

View File

@ -91,7 +91,8 @@ class VolumesTable(volumes_tables.VolumesTable):
verbose_name=_("Name"),
link="horizon:admin:volumes:volumes:detail")
host = tables.Column("os-vol-host-attr:host", verbose_name=_("Host"))
tenant = tables.Column("tenant_name", verbose_name=_("Project"))
tenant = tables.Column(lambda obj: getattr(obj, 'tenant_name', None),
verbose_name=_("Project"))
class Meta(object):
name = "volumes"