mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Merge pull request #772 from preed/preed/ModelSerializer-bool-fix
Don't have the ModelSerializer trust deserialized objects to not have re...
This commit is contained in:
commit
35b86ee52a
|
@ -741,7 +741,7 @@ class ModelSerializer(Serializer):
|
|||
Override the default method to also include model field validation.
|
||||
"""
|
||||
instance = super(ModelSerializer, self).from_native(data, files)
|
||||
if instance:
|
||||
if not self._errors:
|
||||
return self.full_clean(instance)
|
||||
|
||||
def save_object(self, obj, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue
Block a user