Set configuration to empty string if not available
This commit is contained in:
parent
5b7d1301cf
commit
a8caa035c0
1 changed files with 2 additions and 1 deletions
|
@ -47,7 +47,8 @@ def get_or_create_vm_detail(user, manager, vm_id):
|
|||
vm_detail_obj = VMDetail.objects.create(
|
||||
user=user, vm_id=vm_id, disk_size=vm['disk_size'],
|
||||
cores=vm['cores'], memory=vm['memory'],
|
||||
configuration=vm['configuration'], ipv4=vm['ipv4'],
|
||||
configuration="" if vm['configuration'] is None else vm['configuration'],
|
||||
ipv4=vm['ipv4'],
|
||||
ipv6=vm['ipv6']
|
||||
)
|
||||
return vm_detail_obj
|
||||
|
|
Loading…
Reference in a new issue