Commit 49d1f881 by Szabolcs Gelencser

Remove dead code from VmRenewView

parent abfafd7a
...@@ -734,9 +734,6 @@ class VmRenewView(FormOperationMixin, VmOperationView): ...@@ -734,9 +734,6 @@ class VmRenewView(FormOperationMixin, VmOperationView):
choices = (leases_from_roles | default_lease | current_lease).distinct() choices = (leases_from_roles | default_lease | current_lease).distinct()
default = VmLease.objects.get(os_server_id=instance.id).lease default = VmLease.objects.get(os_server_id=instance.id).lease
# if default and default not in choices:
# choices = (choices.distinct() |
# Lease.objects.filter(pk=default.pk).distinct())
val = super(VmRenewView, self).get_form_kwargs() val = super(VmRenewView, self).get_form_kwargs()
val.update({ val.update({
...@@ -758,6 +755,7 @@ class VmRenewView(FormOperationMixin, VmOperationView): ...@@ -758,6 +755,7 @@ class VmRenewView(FormOperationMixin, VmOperationView):
context['lease_request_form'] = LeaseRequestForm() context['lease_request_form'] = LeaseRequestForm()
context['lease_types'] = LeaseType.objects.exists() context['lease_types'] = LeaseType.objects.exists()
return context return context
# #
# #
# class VmStateChangeView(FormOperationMixin, VmOperationView): # class VmStateChangeView(FormOperationMixin, VmOperationView):
......
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