Commit d3079ae0 by Szabolcs Gelencser

Fix template listing on index

parent 4c29a7bb
...@@ -101,7 +101,11 @@ class IndexView(LoginRequiredMixin, TemplateView): ...@@ -101,7 +101,11 @@ class IndexView(LoginRequiredMixin, TemplateView):
}) })
# template # template
context['templates'] = InstanceTemplate.objects.filter(owner_id=user.id) images = openstack_api.glance.image_list_detailed(self.request)[0] # TODO: why nested lists?
snapshot_ids = [
i.id for i in images if hasattr(i, 'image_location') and i.image_location == 'snapshot'
]
context['templates'] = InstanceTemplate.objects.filter(image_id__in=snapshot_ids)
# vxlan # vxlan
all_vxlans = openstack_api.neutron.network_list_for_tenant(self.request, self.request.user.tenant_id) all_vxlans = openstack_api.neutron.network_list_for_tenant(self.request, self.request.user.tenant_id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment