Commit deb02ed6 by Kálmán Viktor

dashboard: use form features for data

parent ececb093
...@@ -784,14 +784,8 @@ class VmResourcesChangeView(VmOperationView): ...@@ -784,14 +784,8 @@ class VmResourcesChangeView(VmOperationView):
else: else:
return redirect(instance.get_absolute_url() + "#resources") return redirect(instance.get_absolute_url() + "#resources")
else: else:
resources = { extra = form.cleaned_data
'num_cores': "num_cores", extra['max_ram_size'] = extra['ram_size']
'priority': "priority",
'ram_size': "ram_size",
'max_ram_size': "ram_size", # TODO
}
for k, v in resources.iteritems():
extra[k] = request.POST.get(v)
return super(VmResourcesChangeView, self).post(request, extra, return super(VmResourcesChangeView, self).post(request, extra,
*args, **kwargs) *args, **kwargs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment