This commit is contained in:
Agustín Formoso 2018-04-10 12:32:22 +00:00 committed by GitHub
commit aa60427ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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