def patch(self, request):
Claim.objects.filter(id__in=request.body).update(....)
return HttpResponse(status=200)
I'm trying to update some of my objects this way. But I get
invalid literal for int() with base 10: '['
so I thought I might need to cast my request.body to list, and I tried it this way:
def patch(self, request):
Claim.objects.filter(id__in=list(request.body)).update(...)
return HttpResponse(status=200)
and I still get the same error.
Why is this happening? If I hardcode it this way:
id__in=[8]
I don't get any errors.
Thanks.