From ef09ae4dab1b355630af25edd4aeefa5a0f6062a Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 3 Apr 2019 23:07:37 +0200 Subject: [PATCH] Obtaing pricing from order --- hosting/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index 3a8997a9..12b0027f 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -1208,8 +1208,8 @@ class InvoiceDetailView(LoginRequiredMixin, DetailView): cpu=context['vm']['cores'], ssd_size=context['vm']['disk_size'], memory=context['vm']['memory'], - pricing_name=(obj.vm_pricing.name - if obj.vm_pricing else 'default') + pricing_name=(obj.order.vm_pricing.name + if obj.order.vm_pricing else 'default') ) context['vm']['vat'] = vat context['vm']['price'] = price @@ -1229,8 +1229,8 @@ class InvoiceDetailView(LoginRequiredMixin, DetailView): cpu=context['vm']['cores'], ssd_size=context['vm']['disk_size'], memory=context['vm']['memory'], - pricing_name=(obj.vm_pricing.name - if obj.vm_pricing else 'default') + pricing_name=(obj.order.vm_pricing.name + if obj.order.vm_pricing else 'default') ) context['vm']['vat'] = vat context['vm']['price'] = price