.
This commit is contained in:
@@ -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",
|
||||
|
||||
+1
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user