mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-03 12:00:12 +03:00
Merge 1bdf641dad
into 1c53fd3212
This commit is contained in:
commit
aa60427ee7
|
@ -630,7 +630,7 @@ class ListSerializer(BaseSerializer):
|
|||
|
||||
return value
|
||||
|
||||
def to_internal_value(self, data):
|
||||
def to_internal_value(self, data, error_function=any):
|
||||
"""
|
||||
List of dicts of native values <- List of dicts of primitive datatypes.
|
||||
"""
|
||||
|
@ -666,7 +666,7 @@ class ListSerializer(BaseSerializer):
|
|||
ret.append(validated)
|
||||
errors.append({})
|
||||
|
||||
if any(errors):
|
||||
if error_function(errors):
|
||||
raise ValidationError(errors)
|
||||
|
||||
return ret
|
||||
|
|
Loading…
Reference in New Issue
Block a user