mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
Remove unnecessary else
This commit is contained in:
parent
f22aeeb0a3
commit
dca8b98356
|
@ -133,7 +133,7 @@ class UpdateModelMixin(object):
|
||||||
self.object = serializer.save(force_insert=True)
|
self.object = serializer.save(force_insert=True)
|
||||||
self.post_save(self.object, created=True)
|
self.post_save(self.object, created=True)
|
||||||
return Response(serializer.data, status=status.HTTP_201_CREATED)
|
return Response(serializer.data, status=status.HTTP_201_CREATED)
|
||||||
else:
|
|
||||||
self.object = serializer.save(force_update=True)
|
self.object = serializer.save(force_update=True)
|
||||||
self.post_save(self.object, created=False)
|
self.post_save(self.object, created=False)
|
||||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
return Response(serializer.data, status=status.HTTP_200_OK)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user