Use username instead of email when creating VM
This commit is contained in:
parent
e2c86116b2
commit
b44a7f98b5
3 changed files with 3 additions and 1 deletions
|
@ -62,7 +62,7 @@ def create_vm_task(self, vm_template_id, user, specs, template, order_id):
|
|||
)
|
||||
|
||||
if 'pass' in user:
|
||||
on_user = user.get('email')
|
||||
on_user = user.get('username')
|
||||
on_pass = user.get('pass')
|
||||
logger.debug("Using user {user} to create VM".format(user=on_user))
|
||||
vm_name = None
|
||||
|
|
|
@ -1173,6 +1173,7 @@ class OrderConfirmationView(DetailView, FormView):
|
|||
user = {
|
||||
'name': custom_user.name,
|
||||
'email': custom_user.email,
|
||||
'username': custom_user.username,
|
||||
'pass': custom_user.password,
|
||||
'request_scheme': request.scheme,
|
||||
'request_host': request.get_host(),
|
||||
|
|
|
@ -1227,6 +1227,7 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView, FormView):
|
|||
user = {
|
||||
'name': self.request.user.name,
|
||||
'email': self.request.user.email,
|
||||
'username': self.request.user.username,
|
||||
'pass': self.request.user.password,
|
||||
'request_scheme': request.scheme,
|
||||
'request_host': request.get_host(),
|
||||
|
|
Loading…
Reference in a new issue