Merge "Fix: Volume Snapshot Table "Project' column info"

This commit is contained in:
Zuul 2019-02-22 15:55:56 +00:00 committed by Gerrit Code Review
commit 2aabd80b20
1 changed files with 1 additions and 2 deletions

View File

@ -65,8 +65,7 @@ class SnapshotsView(tables.PagedTableMixin, tables.DataTableView):
tenant_dict = dict((t.id, t) for t in tenants)
for snapshot in snapshots:
volume = volumes.get(snapshot.volume_id)
tenant_id = getattr(volume,
'os-vol-tenant-attr:tenant_id', None)
tenant_id = snapshot.project_id
tenant = tenant_dict.get(tenant_id, None)
snapshot._volume = volume
snapshot.tenant_name = getattr(tenant, "name", None)