mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
0daa2b22c8
|
@ -28,7 +28,7 @@ The initial aim is to provide a single full-time position on REST framework.
|
|||
<a href="https://rollbar.com/"><img src="https://raw.githubusercontent.com/encode/django-rest-framework/master/docs/img/premium/rollbar-readme.png"/></a>
|
||||
</p>
|
||||
|
||||
*Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Rover](http://jobs.rover.com/), [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [Machinalis](https://hello.machinalis.co.uk/), [Rollbar](https://rollbar.com), and [MicroPyramid](https://micropyramid.com/django-rest-framework-development-services/).*
|
||||
*Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Rover](http://jobs.rover.com/), [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [Machinalis](https://hello.machinalis.co.uk/), and [Rollbar](https://rollbar.com/).*
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ For example:
|
|||
from rest_framework.views import APIView
|
||||
from rest_framework.response import Response
|
||||
from rest_framework import authentication, permissions
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
class ListUsers(APIView):
|
||||
"""
|
||||
|
|
|
@ -129,8 +129,8 @@ class ValidationError(APIException):
|
|||
if code is None:
|
||||
code = self.default_code
|
||||
|
||||
# For validation failures, we may collect may errors together, so the
|
||||
# details should always be coerced to a list if not already.
|
||||
# For validation failures, we may collect many errors together,
|
||||
# so the details should always be coerced to a list if not already.
|
||||
if not isinstance(detail, dict) and not isinstance(detail, list):
|
||||
detail = [detail]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user