From 39646647d31dc657cae38338548dde561593beef Mon Sep 17 00:00:00 2001 From: Kumi Date: Fri, 27 Oct 2023 20:39:03 +0200 Subject: [PATCH] Fix dismissal of finished jobs --- src/pix360core/static/js/worker.js | 4 ++++ src/pix360core/views.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pix360core/static/js/worker.js b/src/pix360core/static/js/worker.js index 1f45266..3086428 100644 --- a/src/pix360core/static/js/worker.js +++ b/src/pix360core/static/js/worker.js @@ -21,6 +21,10 @@ function unlockform() { function deletecard(jobid) { if ($("#" + jobid).length) { $("#" + jobid).remove(); + $.ajax({ + type: "GET", + url: "/delete/" + jobid, + }); } } diff --git a/src/pix360core/views.py b/src/pix360core/views.py index 0ff68eb..b82125d 100644 --- a/src/pix360core/views.py +++ b/src/pix360core/views.py @@ -118,7 +118,7 @@ class ConversionListView(LoginRequiredMixin, View): class ConversionDeleteView(LoginRequiredMixin, View): """View for deleting a conversion """ - def post(self, request, *args, **kwargs): + def get(self, request, *args, **kwargs): """Handle the POST request """ conversion = Conversion.objects.filter(id=kwargs['id']).first()