mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-02 20:54:42 +03:00
Tweak comment wrapping.
This commit is contained in:
parent
68573a3c1a
commit
d328f1827d
|
@ -125,8 +125,8 @@ class UpdateModelMixin(object):
|
||||||
try:
|
try:
|
||||||
self.pre_save(serializer.object)
|
self.pre_save(serializer.object)
|
||||||
except ValidationError as err:
|
except ValidationError as err:
|
||||||
# full_clean on model instance may be called in pre_save, so we
|
# full_clean on model instance may be called in pre_save,
|
||||||
# have to handle eventual errors.
|
# so we have to handle eventual errors.
|
||||||
return Response(err.message_dict, status=status.HTTP_400_BAD_REQUEST)
|
return Response(err.message_dict, status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
||||||
if self.object is None:
|
if self.object is None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user