Invoice: Get VM name from id and configuration

This commit is contained in:
PCoder 2017-09-28 02:36:49 +05:30
parent 858fdd5e3f
commit 4e080c9afc

View file

@ -694,6 +694,7 @@ class OrdersHostingDetailView(LoginRequiredMixin,
try:
vm_detail = VMDetail.objects.get(vm_id=obj.vm_id)
context['vm'] = vm_detail.__dict__
context['vm']['name'] = '{}-{}'.format(context['vm']['configuration'], context['vm']['vm_id'])
except VMDetail.DoesNotExist:
try:
manager = OpenNebulaManager(