From 931454d9d6b395007879280391d13827151186f2 Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 3 Aug 2021 22:03:34 +0100 Subject: [PATCH] . --- longs/templates/longs/question_view.html | 2 +- longs/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/longs/templates/longs/question_view.html b/longs/templates/longs/question_view.html index c3c511f5..c271bdf0 100644 --- a/longs/templates/longs/question_view.html +++ b/longs/templates/longs/question_view.html @@ -32,7 +32,7 @@ url: "{% url 'longs:user_answer_delete_multiple' %}", data: { csrfmiddlewaretoken: "{{ csrf_token }}", - answer_ids: this.checked // true if checked else false + answer_ids: JSON.stringify(answer_ids) // true if checked else false }, type: "POST", dataType: "json", diff --git a/longs/views.py b/longs/views.py index 3da8c3e4..10faff36 100755 --- a/longs/views.py +++ b/longs/views.py @@ -1022,7 +1022,7 @@ class UserAnswerDelete(SuperuserRequiredMixin, DeleteView): @user_passes_test(lambda u: u.is_superuser) def user_answer_delete_multiple(request): if request.is_ajax(): - answer_ids = request.GET["answer_ids"] + answer_ids = json.load(request.GET["answer_ids"]) # We could probably delete them all at once.... for id in answer_ids: