summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-03-06 14:48:39 +0000
committerGerrit Code Review <review@openstack.org>2017-03-06 14:48:39 +0000
commitdc4900a896431343e32a57458dcae7f6b1dba897 (patch)
tree48315ae23601391058bd4f86174095b55ff81cac
parentc1bb2f97644e0dc26d0ab2f4b039b3169048d364 (diff)
parent4037c0954a2b9684b75b94f06c3705e4dc2c275a (diff)
Merge "Fix restore index page"
-rw-r--r--karbor_dashboard/restores/views.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/karbor_dashboard/restores/views.py b/karbor_dashboard/restores/views.py
index 801fb71..2f441bc 100644
--- a/karbor_dashboard/restores/views.py
+++ b/karbor_dashboard/restores/views.py
@@ -55,13 +55,17 @@ class IndexView(horizon_tables.DataTableView):
55 reversed_order=reversed_order) 55 reversed_order=reversed_order)
56 56
57 for restore in restores: 57 for restore in restores:
58 checkpoint = karborclient.checkpoint_get( 58 try:
59 self.request, 59 checkpoint = karborclient.checkpoint_get(
60 restore.provider_id, 60 self.request,
61 restore.checkpoint_id) 61 restore.provider_id,
62 restore.checkpoint_id)
63 plan_name = checkpoint.protection_plan["name"]
64 except Exception:
65 plan_name = "Not Found"
62 provider = karborclient.provider_get(self.request, 66 provider = karborclient.provider_get(self.request,
63 restore.provider_id) 67 restore.provider_id)
64 setattr(restore, "name", checkpoint.protection_plan["name"]) 68 setattr(restore, "name", plan_name)
65 setattr(restore, "provider_name", provider.name) 69 setattr(restore, "provider_name", provider.name)
66 70
67 except Exception: 71 except Exception: