Commit c4ce0792 by Kálmán Viktor

dashboard: exclude qcow2-snap disks in vm create

parent d3808ba3
......@@ -545,7 +545,7 @@ class VmCreate(LoginRequiredMixin, TemplateView):
def get(self, request, form=None, *args, **kwargs):
if form is None:
form = self.form_class()
form.fields['disks'].queryset = Disk.objects.all()
form.fields['disks'].queryset = Disk.objects.exclude(type="qcow2-snap")
form.fields['networks'].queryset = Vlan.get_objects_with_level(
'user', request.user)
context = self.get_context_data(**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