Skip to content

Commit

Permalink
Merge pull request #28 from stackhpc/upstream/yoga-2023-08-07
Browse files Browse the repository at this point in the history
Synchronise yoga with upstream
  • Loading branch information
markgoddard authored Aug 7, 2023
2 parents dfd73f5 + eb57aa5 commit c36cb5b
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions openstack_dashboard/dashboards/project/snapshots/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 gettext_lazy as _

from horizon import exceptions
Expand Down Expand Up @@ -104,11 +103,8 @@ def get_object(self):
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):
Expand All @@ -117,12 +113,6 @@ def get_initial(self):
'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
Expand Down

0 comments on commit c36cb5b

Please sign in to comment.