mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 19:43:59 +03:00
Use new exception style
This commit is contained in:
parent
9c7524fc33
commit
c95fa81cb2
|
@ -526,7 +526,7 @@ class ModelSerializer(Serializer):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
instance.full_clean(exclude=self.get_validation_exclusions())
|
instance.full_clean(exclude=self.get_validation_exclusions())
|
||||||
except ValidationError, err:
|
except ValidationError as err:
|
||||||
self._errors = err.message_dict
|
self._errors = err.message_dict
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user