From 9491bb81a2e115df2a4fe7547ecec96772742ac9 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 24 Sep 2017 02:03:48 +0530 Subject: [PATCH] Added missing import after merge --- hosting/views.py | 7 +------ opennebula_api/models.py | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index ff6525f4..1fbdbca9 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -32,7 +32,7 @@ from datacenterlight.tasks import create_vm_task from membership.models import CustomUser, StripeCustomer from opennebula_api.models import OpenNebulaManager from opennebula_api.serializers import VirtualMachineSerializer, \ - VirtualMachineTemplateSerializer + VirtualMachineTemplateSerializer, VMTemplateSerializer from utils.forms import BillingAddressForm, PasswordResetRequestForm, \ UserBillingAddressForm from utils.mailer import BaseEmail @@ -652,11 +652,6 @@ class OrdersHostingDetailView(LoginRequiredMixin, context = super(DetailView, self).get_context_data(**kwargs) obj = self.get_object() owner = self.request.user - if 'specs' not in self.request.session: - return HttpResponseRedirect( - reverse('hosting:create_virtual_machine')) - if 'token' not in self.request.session: - return HttpResponseRedirect(reverse('hosting:payment')) stripe_customer_id = self.request.session.get('customer') customer = StripeCustomer.objects.filter(id=stripe_customer_id).first() stripe_utils = StripeUtils() diff --git a/opennebula_api/models.py b/opennebula_api/models.py index 7042f3c0..f35cf657 100644 --- a/opennebula_api/models.py +++ b/opennebula_api/models.py @@ -150,10 +150,10 @@ class OpenNebulaManager(): oca.User.METHODS['allocate'], email, password, 'core') logger.debug( - "User {} does not exist. Created the user. User id = {}", + "User {} does not exist. Created the user. User id = {}".format( email, opennebula_user - ) + )) return opennebula_user except ConnectionRefusedError: logger.info(