Commit 860300db by Bach Dániel

dashboard: remove unused form helper

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