aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/mixins.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/mixins.py b/rest_framework/mixins.py
index 8dc0c329..2700606d 100644
--- a/rest_framework/mixins.py
+++ b/rest_framework/mixins.py
@@ -124,6 +124,6 @@ class DestroyModelMixin(object):
Should be mixed in with `SingleObjectBaseView`.
"""
def destroy(self, request, *args, **kwargs):
- self.object = self.get_object()
- self.object.delete()
+ obj = self.get_object()
+ obj.delete()
return Response(status=status.HTTP_204_NO_CONTENT)