[Answered ]-Django 'str' object has no attribute 'id' in getlist()

1👍

Give this a try

selected_list = request.POST.getlist('marked_delete')
selected = Issue.objects.filter(id__in=selected_list)

for book in books:
    for select in selected:
        if select.book_id_id == book.id:
            print(select.id)

Leave a comment