From 321c060dbe251c00d9539a86bfb32fc18d639d9e Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 11 Jul 2016 12:04:11 +0100 Subject: [PATCH] Resolve incorrect media type (#4254) --- rest_framework/response.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rest_framework/response.py b/rest_framework/response.py index 0e97668eb..ab8aff114 100644 --- a/rest_framework/response.py +++ b/rest_framework/response.py @@ -51,14 +51,13 @@ class Response(SimpleTemplateResponse): @property def rendered_content(self): renderer = getattr(self, 'accepted_renderer', None) - media_type = getattr(self, 'accepted_media_type', None) context = getattr(self, 'renderer_context', None) assert renderer, ".accepted_renderer not set on Response" - assert media_type, ".accepted_media_type not set on Response" assert context, ".renderer_context not set on Response" context['response'] = self + media_type = renderer.media_type charset = renderer.charset content_type = self.content_type