From 55cbe3244a4625558804f491ea296ce26b48d3ff Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Mon, 7 May 2018 09:14:31 +0530 Subject: [PATCH] fix testing error --- hosting/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index ec583a9b..7623ed90 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -654,7 +654,7 @@ class PaymentVMView(LoginRequiredMixin, FormView): context.update({ 'stripe_key': settings.STRIPE_API_PUBLIC_KEY, 'vm_pricing': VMPricing.get_vm_pricing_by_name( - self.request.session['specs']['pricing_name'] + self.request.session.get('specs', {}).get('pricing_name') ), }) @@ -1010,7 +1010,6 @@ class CreateVirtualMachinesView(LoginRequiredMixin, View): @method_decorator(decorators) def get(self, request, *args, **kwargs): - print(get_cms_integration('default')) context = { 'templates': VMTemplate.objects.all(), 'cms_integration': get_cms_integration('default'),