From e045caebbe6f704b6a95fc7763365de1c2e18a2e Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Thu, 14 Sep 2017 02:52:37 +0530 Subject: [PATCH] redirect on success --- hosting/static/hosting/js/virtual_machine_detail.js | 2 +- hosting/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hosting/static/hosting/js/virtual_machine_detail.js b/hosting/static/hosting/js/virtual_machine_detail.js index ce97d44e..076ec344 100644 --- a/hosting/static/hosting/js/virtual_machine_detail.js +++ b/hosting/static/hosting/js/virtual_machine_detail.js @@ -21,7 +21,7 @@ $( document ).ready(function() { $container.addClass('terminate-success') .find('.vm-item-lg').text(data.text); $btn.remove(); - // window.location = data.redirect; + window.location = data.redirect; } else { $container.addClass('terminate-fail') diff --git a/hosting/views.py b/hosting/views.py index 685fe0b4..cf17c9f8 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -971,7 +971,7 @@ class VirtualMachineView(LoginRequiredMixin, View): break try: manager.get_vm(self.kwargs.get('pk')) - except: + except BaseException: break else: sleep(2)