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