Fix bug getting VMTemplate object from vm_template_id

This commit is contained in:
PCoder 2018-07-01 18:42:11 +02:00
parent 900f014d92
commit f48005166e

View file

@ -54,7 +54,9 @@ def create_vm(billing_address_data, stripe_customer_id, specs,
) )
order_specs_obj, obj_created = OrderSpecifications.objects.get_or_create( order_specs_obj, obj_created = OrderSpecifications.objects.get_or_create(
vm_template=VMTemplate.objects.get(vm_template_id), vm_template=VMTemplate.objects.get(
opennebula_vm_template_id=vm_template_id
),
cores=specs['cpu'], memory=specs['memory'], ssd_size=specs['disk_size'] cores=specs['cpu'], memory=specs['memory'], ssd_size=specs['disk_size']
) )
order.order_specs = order_specs_obj order.order_specs = order_specs_obj