Save new user's hosting key only in that case
This commit is contained in:
parent
26fab27c3f
commit
dfb16f0c25
1 changed files with 4 additions and 4 deletions
|
@ -848,10 +848,10 @@ class OrderConfirmationView(DetailView, FormView):
|
||||||
new_user = authenticate(username=custom_user.email,
|
new_user = authenticate(username=custom_user.email,
|
||||||
password=password)
|
password=password)
|
||||||
login(request, new_user)
|
login(request, new_user)
|
||||||
if 'new_user_hosting_key_id' in self.request.session:
|
if 'new_user_hosting_key_id' in self.request.session:
|
||||||
user_hosting_key = UserHostingKey.objects.get(self.request.session['new_user_hosting_key_id'])
|
user_hosting_key = UserHostingKey.objects.get(id=self.request.session['new_user_hosting_key_id'])
|
||||||
user_hosting_key.user = new_user
|
user_hosting_key.user = new_user
|
||||||
user_hosting_key.save()
|
user_hosting_key.save()
|
||||||
|
|
||||||
owner = new_user
|
owner = new_user
|
||||||
manager = OpenNebulaManager(
|
manager = OpenNebulaManager(
|
||||||
|
|
Loading…
Reference in a new issue