Added missing import after merge

This commit is contained in:
PCoder 2017-09-24 02:03:48 +05:30
parent 656e7563fd
commit 9491bb81a2
2 changed files with 3 additions and 8 deletions

View file

@ -32,7 +32,7 @@ from datacenterlight.tasks import create_vm_task
from membership.models import CustomUser, StripeCustomer from membership.models import CustomUser, StripeCustomer
from opennebula_api.models import OpenNebulaManager from opennebula_api.models import OpenNebulaManager
from opennebula_api.serializers import VirtualMachineSerializer, \ from opennebula_api.serializers import VirtualMachineSerializer, \
VirtualMachineTemplateSerializer VirtualMachineTemplateSerializer, VMTemplateSerializer
from utils.forms import BillingAddressForm, PasswordResetRequestForm, \ from utils.forms import BillingAddressForm, PasswordResetRequestForm, \
UserBillingAddressForm UserBillingAddressForm
from utils.mailer import BaseEmail from utils.mailer import BaseEmail
@ -652,11 +652,6 @@ class OrdersHostingDetailView(LoginRequiredMixin,
context = super(DetailView, self).get_context_data(**kwargs) context = super(DetailView, self).get_context_data(**kwargs)
obj = self.get_object() obj = self.get_object()
owner = self.request.user 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') stripe_customer_id = self.request.session.get('customer')
customer = StripeCustomer.objects.filter(id=stripe_customer_id).first() customer = StripeCustomer.objects.filter(id=stripe_customer_id).first()
stripe_utils = StripeUtils() stripe_utils = StripeUtils()

View file

@ -150,10 +150,10 @@ class OpenNebulaManager():
oca.User.METHODS['allocate'], email, oca.User.METHODS['allocate'], email,
password, 'core') password, 'core')
logger.debug( logger.debug(
"User {} does not exist. Created the user. User id = {}", "User {} does not exist. Created the user. User id = {}".format(
email, email,
opennebula_user opennebula_user
) ))
return opennebula_user return opennebula_user
except ConnectionRefusedError: except ConnectionRefusedError:
logger.info( logger.info(