def delete_scans(request):
    context = {}
    if request.method == "POST":
        list_of_scan_id = []

        for key, value in request.POST.items():
            if key != "scan_history_table_length" and key != "csrfmiddlewaretoken":
                ScanHistory.objects.filter(id=value).delete()
        messages.add_message(
            request,
            messages.INFO,
            'All Scans deleted!')
    return HttpResponseRedirect(reverse('scan_history'))
The software uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.