Checklist
Description
I'm using Django 3.1.7 & DRF 3.12.2.
When an exception occurs in a ViewSet, Django automatically sends an email to the administrator.
The problem is that the POST data is always empty in this email:
POST: No POST data
Instead, I expect to see the JSON payload that was sent in the request body.
I added a breakpoint in django.utils.log.AdminEmailHandler.emit(), and I can confirm that request.POST is empty.
But on the other hand, I'm sure that request.data was not empty in the ViewSet.
I verified that the request's Content-Type and X-Requested-With are correctly set.
The only non-standard middlewares I use are corsheaders and admin_reorder; I don't think they are related to this problem.
Checklist
Description
I'm using Django 3.1.7 & DRF 3.12.2.
When an exception occurs in a
ViewSet, Django automatically sends an email to the administrator.The problem is that the POST data is always empty in this email:
Instead, I expect to see the JSON payload that was sent in the request body.
I added a breakpoint in
django.utils.log.AdminEmailHandler.emit(), and I can confirm thatrequest.POSTis empty.But on the other hand, I'm sure that
request.datawas not empty in theViewSet.I verified that the request's
Content-TypeandX-Requested-Withare correctly set.The only non-standard middlewares I use are corsheaders and admin_reorder; I don't think they are related to this problem.