Fix bug: use dict update instead of replacing key - 'vm'

This commit is contained in:
PCoder 2019-01-12 12:32:31 +01:00
parent 8bf89e6711
commit e1463127c2

View file

@ -885,7 +885,7 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView):
pricing_name=(obj.vm_pricing.name
if obj.vm_pricing else 'default')
)
context['vm'] = vm_price_dict
context['vm'].update(vm_price_dict)
context['subscription_end_date'] = vm_detail.end_date()
except VMDetail.DoesNotExist:
try:
@ -901,7 +901,7 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView):
pricing_name=(obj.vm_pricing.name
if obj.vm_pricing else 'default')
)
context['vm'] = vm_price_dict
context['vm'].update(vm_price_dict)
except WrongIdError:
messages.error(
self.request,