Fix #521. (Browseable API exception on delete)

This commit is contained in:
Tom Christie 2012-12-19 22:05:35 +00:00
parent d90d5380d7
commit 598ae3286a

View File

@ -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)