Fix: Volume Snapshot Table "Project' column info

This patch fixes Volume Snapshot table 'Project' column
info.

Change-Id: Ibc8288da55867b63fddbb2b763bfd61377b0e5ad
Closes-Bug: #1815859
This commit is contained in:
manchandavishal 2019-02-19 09:57:55 +00:00 committed by Vishal Manchanda
parent d63a65683a
commit b37abb1168
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)