Commit 9703cb54 by Őry Máté

dashboard: fix fix of renew

parent 9977cf86
......@@ -836,7 +836,8 @@ class VmRenewView(FormOperationMixin, TokenOperationView, VmOperationView):
choices = Lease.get_objects_with_level("user", self.request.user)
default = self.get_op()
if default and default not in choices:
choices = choices | Lease.objects.filter(
choices = (choices.distinct() |
val = super(VmRenewView, self).get_form_kwargs()
val.update({'choices': choices, 'default': default})
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