Reformatted datacenterlight/tasks.py
This commit is contained in:
parent
b17af3bb09
commit
0bc2b22f62
1 changed files with 5 additions and 3 deletions
|
@ -52,7 +52,8 @@ def create_vm_task(self, vm_template_id, user, specs, template,
|
||||||
stripe_customer_id, billing_address_data,
|
stripe_customer_id, billing_address_data,
|
||||||
billing_address_id,
|
billing_address_id,
|
||||||
charge, cc_details):
|
charge, cc_details):
|
||||||
logger.debug("Running create_vm_task on {}".format(current_task.request.hostname))
|
logger.debug(
|
||||||
|
"Running create_vm_task on {}".format(current_task.request.hostname))
|
||||||
vm_id = None
|
vm_id = None
|
||||||
try:
|
try:
|
||||||
final_price = specs.get('price')
|
final_price = specs.get('price')
|
||||||
|
@ -142,9 +143,10 @@ def create_vm_task(self, vm_template_id, user, specs, template,
|
||||||
email.send()
|
email.send()
|
||||||
|
|
||||||
if 'pass' in user:
|
if 'pass' in user:
|
||||||
lang = 'en-us'
|
lang = 'en-us'
|
||||||
if user.get('language') is not None:
|
if user.get('language') is not None:
|
||||||
logger.debug("Language is set to {}".format(user.get('language')))
|
logger.debug(
|
||||||
|
"Language is set to {}".format(user.get('language')))
|
||||||
lang = user.get('language')
|
lang = user.get('language')
|
||||||
translation.activate(lang)
|
translation.activate(lang)
|
||||||
# Send notification to the user as soon as VM has been booked
|
# Send notification to the user as soon as VM has been booked
|
||||||
|
|
Loading…
Reference in a new issue