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().instance.lease
if default and default not in choices:
choices = choices | Lease.objects.filter(pk=default.pk).distinct()
choices = (choices.distinct() |
Lease.objects.filter(pk=default.pk).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