Fix for BadRequest in plain API views.