From dca8b983568e1ca7534ad7244e6eb57e1b87cc68 Mon Sep 17 00:00:00 2001 From: Ian Foote Date: Tue, 18 Feb 2014 12:28:02 +0000 Subject: [PATCH] Remove unnecessary else --- rest_framework/mixins.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rest_framework/mixins.py b/rest_framework/mixins.py index 536303433..7722d5bed 100644 --- a/rest_framework/mixins.py +++ b/rest_framework/mixins.py @@ -133,10 +133,10 @@ class UpdateModelMixin(object): self.object = serializer.save(force_insert=True) self.post_save(self.object, created=True) return Response(serializer.data, status=status.HTTP_201_CREATED) - else: - self.object = serializer.save(force_update=True) - self.post_save(self.object, created=False) - return Response(serializer.data, status=status.HTTP_200_OK) + + self.object = serializer.save(force_update=True) + self.post_save(self.object, created=False) + return Response(serializer.data, status=status.HTTP_200_OK) def partial_update(self, request, *args, **kwargs): kwargs['partial'] = True