error msg fix

This commit is contained in:
Arvind Tiwari 2017-09-15 17:38:52 +05:30
parent 77f2454e3c
commit bbb1919404
2 changed files with 2 additions and 2 deletions

View file

@ -50,7 +50,6 @@ $(document).ready(function() {
$.post(url) $.post(url)
.done(function(data) { .done(function(data) {
console.log("success", data);
if (data.status == true) { if (data.status == true) {
VMTerminateSuccess($container, data); VMTerminateSuccess($container, data);
} else { } else {
@ -62,7 +61,6 @@ $(document).ready(function() {
} }
}) })
.fail(function(data) { .fail(function(data) {
console.log(data)
if (data.status==504) { if (data.status==504) {
VMTerminateStatus($container, url); VMTerminateStatus($container, url);
} else { } else {

View file

@ -925,6 +925,8 @@ class VirtualMachineView(LoginRequiredMixin, View):
if vm is None: if vm is None:
if self.request.is_ajax(): if self.request.is_ajax():
storage = messages.get_messages(request) storage = messages.get_messages(request)
for m in storage:
pass
storage.used = True storage.used = True
return HttpResponse( return HttpResponse(
json.dumps({'redirect': self.get_success_url()}), json.dumps({'redirect': self.get_success_url()}),