mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 04:50:12 +03:00
use request's content-type as response's if there's no content
This commit is contained in:
parent
931b6cb7e0
commit
60585ac281
|
@ -91,7 +91,7 @@ class DestroyModelMixin(object):
|
||||||
def destroy(self, request, *args, **kwargs):
|
def destroy(self, request, *args, **kwargs):
|
||||||
instance = self.get_object()
|
instance = self.get_object()
|
||||||
self.perform_destroy(instance)
|
self.perform_destroy(instance)
|
||||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
return Response(status=status.HTTP_204_NO_CONTENT, content_type=request.content_type)
|
||||||
|
|
||||||
def perform_destroy(self, instance):
|
def perform_destroy(self, instance):
|
||||||
instance.delete()
|
instance.delete()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user