Commit 860300db by Bach Dániel

dashboard: remove unused form helper

parent f750837b
......@@ -765,12 +765,6 @@ class VmMigrateForm(forms.Form):
queryset=choices, initial=default, required=False,
widget=forms.RadioSelect(), label=_("Node")))
@property
def helper(self):
helper = FormHelper(self)
helper.form_tag = False
return helper
class VmStateChangeForm(forms.Form):
......
......@@ -14,7 +14,7 @@ Choose a compute node to migrate {{obj}} to.
{% block formfields %}
<ul id="vm-migrate-node-list" class="list-unstyled">
{% with current=object.node.pk recommended=form.fields.to_node.initial %}
{% with current=object.node.pk recommended=form.fields.to_node.initial.pk %}
{% for n in form.fields.to_node.queryset.all %}
<li class="panel panel-default"><div class="panel-body">
<label for="migrate-to-{{n.pk}}">
......
......@@ -437,7 +437,7 @@ class VmMigrateView(FormOperationMixin, VmOperationView):
inst = self.get_object()
try:
if isinstance(inst, Instance):
default = inst.select_node().pk
default = inst.select_node()
except SchedulerError:
logger.exception("scheduler error:")
......
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