summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2023-04-10 16:55:53 +0000
committerGerrit Code Review <review@openstack.org>2023-04-10 16:55:53 +0000
commit07343c853af4e9b74fe11faaa2bbc1a8c1e62b78 (patch)
tree348ca5c2320986e2b946fce9e4bcfe20bca47e10
parentcb95e46406d32843a7f8d1b4994f9216aa0b92c6 (diff)
parent2f600272bfffb3024e6f06a369f9b4768dd1a0b0 (diff)
downloadhorizon-20.1.4.tar.gz
Merge "Fix success_url parameter issue for Edit Snapshot" into stable/xenaxena-em20.1.4
-rw-r--r--openstack_dashboard/dashboards/project/snapshots/views.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/openstack_dashboard/dashboards/project/snapshots/views.py b/openstack_dashboard/dashboards/project/snapshots/views.py
index be3fe4e97..a92da5162 100644
--- a/openstack_dashboard/dashboards/project/snapshots/views.py
+++ b/openstack_dashboard/dashboards/project/snapshots/views.py
@@ -12,7 +12,6 @@
from django.urls import reverse
from django.urls import reverse_lazy
-from django.utils.http import urlencode
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
@@ -104,11 +103,8 @@ class UpdateView(forms.ModalFormView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['snapshot'] = self.get_object()
- success_url = self.request.GET.get('success_url', "")
args = (self.kwargs['snapshot_id'],)
- params = urlencode({"success_url": success_url})
- context['submit_url'] = "?".join([reverse(self.submit_url, args=args),
- params])
+ context['submit_url'] = reverse(self.submit_url, args=args)
return context
def get_initial(self):
@@ -117,12 +113,6 @@ class UpdateView(forms.ModalFormView):
'name': snapshot.name,
'description': snapshot.description}
- def get_success_url(self):
- success_url = self.request.GET.get(
- "success_url",
- reverse_lazy("horizon:project:snapshots:index"))
- return success_url
-
class DetailView(tabs.TabView):
tab_group_class = vol_snapshot_tabs.SnapshotDetailTabs