Commit 7180bd8f by Bach Dániel

dashboard: fix forms

parent b4596a86
...@@ -898,7 +898,7 @@ class VmDownloadDiskForm(OperationForm): ...@@ -898,7 +898,7 @@ class VmDownloadDiskForm(OperationForm):
def clean(self): def clean(self):
cleaned_data = super(VmDownloadDiskForm, self).clean() cleaned_data = super(VmDownloadDiskForm, self).clean()
if not cleaned_data['name']: if not cleaned_data['name']:
if cleaned_data['url']: if cleaned_data.get('url'):
cleaned_data['name'] = urlparse( cleaned_data['name'] = urlparse(
cleaned_data['url']).path.split('/')[-1] cleaned_data['url']).path.split('/')[-1]
if not cleaned_data['name']: if not cleaned_data['name']:
...@@ -933,6 +933,7 @@ class VmRemoveInterfaceForm(OperationForm): ...@@ -933,6 +933,7 @@ class VmRemoveInterfaceForm(OperationForm):
self.interface.vlan)), self.interface.vlan)),
css_class="form-group", css_class="form-group",
), ),
Field("interface"),
) )
return helper return helper
......
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