mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-27 03:54:01 +03:00
Merge remote-tracking branch 'upstream/master' into writable-serializers
This commit is contained in:
commit
ae6ca7456f
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
### Master
|
### Master
|
||||||
|
|
||||||
|
* Bugfix: Fix exception in browseable API on DELETE.
|
||||||
* Bugfix: Fix issue where pk was was being set to a string if set by URL kwarg.
|
* Bugfix: Fix issue where pk was was being set to a string if set by URL kwarg.
|
||||||
|
|
||||||
### 2.1.11
|
### 2.1.11
|
||||||
|
|
|
@ -124,6 +124,6 @@ class DestroyModelMixin(object):
|
||||||
Should be mixed in with `SingleObjectBaseView`.
|
Should be mixed in with `SingleObjectBaseView`.
|
||||||
"""
|
"""
|
||||||
def destroy(self, request, *args, **kwargs):
|
def destroy(self, request, *args, **kwargs):
|
||||||
self.object = self.get_object()
|
obj = self.get_object()
|
||||||
self.object.delete()
|
obj.delete()
|
||||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user