diff options
| author | Tom Christie | 2012-12-19 22:05:35 +0000 | 
|---|---|---|
| committer | Tom Christie | 2012-12-19 22:05:35 +0000 | 
| commit | 598ae3286ac6343a59e6d80fc93428539c5f836e (patch) | |
| tree | 364365bd2b1ada25c196c1c45717dd2c48db3931 /rest_framework/mixins.py | |
| parent | d90d5380d730b992b1b59aaf9d1f89fbbbba0f9f (diff) | |
| download | django-rest-framework-598ae3286ac6343a59e6d80fc93428539c5f836e.tar.bz2 | |
Fix #521.  (Browseable API exception on delete)
Diffstat (limited to 'rest_framework/mixins.py')
| -rw-r--r-- | rest_framework/mixins.py | 4 | 
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) | 
