Commit f9793aa0 by Őry Máté

one: keep vm delete message also if ajax

parent 8cb0c931
......@@ -388,7 +388,10 @@ class VmDeleteView(View):
messages.success(request, _('Virtual machine is successfully deleted.'))
except:
messages.error(request, _('Failed to delete virtual machine.'))
return redirect('/')
if request.is_ajax():
return HttpResponse("")
else:
return redirect('/')
def get(self, request, iid, *args, **kwargs):
i = get_object_or_404(Instance, id=iid, owner=request.user)
......
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