Merge "Fix restore index page"

This commit is contained in:
Jenkins 2017-03-06 14:48:39 +00:00 committed by Gerrit Code Review
commit dc4900a896
1 changed files with 9 additions and 5 deletions

View File

@ -55,13 +55,17 @@ class IndexView(horizon_tables.DataTableView):
reversed_order=reversed_order)
for restore in restores:
checkpoint = karborclient.checkpoint_get(
self.request,
restore.provider_id,
restore.checkpoint_id)
try:
checkpoint = karborclient.checkpoint_get(
self.request,
restore.provider_id,
restore.checkpoint_id)
plan_name = checkpoint.protection_plan["name"]
except Exception:
plan_name = "Not Found"
provider = karborclient.provider_get(self.request,
restore.provider_id)
setattr(restore, "name", checkpoint.protection_plan["name"])
setattr(restore, "name", plan_name)
setattr(restore, "provider_name", provider.name)
except Exception: