.
This commit is contained in:
+3
-2
@@ -1122,10 +1122,11 @@ class RapidLateralityViewSet(
|
||||
@user_passes_test(lambda u: u.is_superuser)
|
||||
def user_answer_delete_multiple(request):
|
||||
if request.is_ajax():
|
||||
print(request.POST["answer_ids"])
|
||||
answer_ids = json.loads(request.POST["answer_ids"])
|
||||
|
||||
# We could probably delete them all at once....
|
||||
for id in answer_ids:
|
||||
CidUserAnswer.objects.get(pk=id).delete()
|
||||
return HttpResponseRedirect(request.path_info)
|
||||
return HttpResponse("/")
|
||||
return JsonResponse({"data": "success"})
|
||||
return JsonResponse({"data": "error"})
|
||||
|
||||
Reference in New Issue
Block a user