mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 20:40:14 +03:00
Merge 2d755ead3c
into 26623436f3
This commit is contained in:
commit
32a56e456e
|
@ -181,7 +181,7 @@ class BaseSerializer(Field):
|
|||
'You must call `.is_valid()` before calling `.save()`.'
|
||||
)
|
||||
|
||||
assert not self.errors, (
|
||||
assert not self._errors, (
|
||||
'You cannot call `.save()` on a serializer with invalid data.'
|
||||
)
|
||||
|
||||
|
@ -242,7 +242,7 @@ class BaseSerializer(Field):
|
|||
self._errors = {}
|
||||
|
||||
if self._errors and raise_exception:
|
||||
raise ValidationError(self.errors)
|
||||
raise ValidationError(self._errors)
|
||||
|
||||
return not bool(self._errors)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user