From a47d0067719b5328735523795aeca96bfe45ca9b Mon Sep 17 00:00:00 2001 From: catborise Date: Thu, 10 Jun 2021 13:46:08 +0300 Subject: [PATCH] fix edit instance volume for running instances to prevent bus error --- instances/templates/{ => instances}/edit_instance_volume.html | 2 +- instances/templates/instances/settings_tab.html | 2 +- instances/views.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename instances/templates/{ => instances}/edit_instance_volume.html (98%) diff --git a/instances/templates/edit_instance_volume.html b/instances/templates/instances/edit_instance_volume.html similarity index 98% rename from instances/templates/edit_instance_volume.html rename to instances/templates/instances/edit_instance_volume.html index ec0c3df..ff5fbdc 100644 --- a/instances/templates/edit_instance_volume.html +++ b/instances/templates/instances/edit_instance_volume.html @@ -121,7 +121,7 @@
diff --git a/instances/templates/instances/settings_tab.html b/instances/templates/instances/settings_tab.html index ef79a45..ddcf390 100644 --- a/instances/templates/instances/settings_tab.html +++ b/instances/templates/instances/settings_tab.html @@ -290,7 +290,7 @@ - {% include 'edit_instance_volume.html' with id=forloop.counter0 %} + {% include 'instances/edit_instance_volume.html' with id=forloop.counter0 %}
{% csrf_token %} diff --git a/instances/views.py b/instances/views.py index 2fb3ab5..6669aa9 100644 --- a/instances/views.py +++ b/instances/views.py @@ -596,8 +596,8 @@ def edit_volume(request, pk): shareable = bool(request.POST.get("vol_shareable", False)) readonly = bool(request.POST.get("vol_readonly", False)) disk_type = request.POST.get("vol_type", "") - new_bus = request.POST.get("vol_bus", "") bus = request.POST.get("vol_bus_old", "") + new_bus = request.POST.get("vol_bus", bus) serial = request.POST.get("vol_serial", "") format = request.POST.get("vol_format", "") cache = request.POST.get("vol_cache", app_settings.INSTANCE_VOLUME_DEFAULT_CACHE)