1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00

Fix: True/False value for Add new disk with metadata option

This commit is contained in:
catborise 2019-03-18 16:50:11 +03:00
parent ca6b3bbca1
commit e63aaa926e

View file

@ -469,7 +469,7 @@ def instance(request, compute_id, vname):
name = request.POST.get('name', '')
format = request.POST.get('format', default_format)
size = request.POST.get('size', 0)
meta_prealloc = request.POST.get('meta_prealloc', False)
meta_prealloc = True if request.POST.get('meta_prealloc', False) else False
bus = request.POST.get('bus', default_bus)
cache = request.POST.get('cache', default_cache)
target = get_new_disk_dev(media, disks, bus)
@ -774,7 +774,7 @@ def instance(request, compute_id, vname):
if request.user.is_superuser or request.user.userattributes.can_clone_instances:
if 'clone' in request.POST:
clone_data = {}
clone_data = dict
clone_data['name'] = request.POST.get('name', '')
disk_sum = sum([disk['size'] >> 30 for disk in disks])