Skip to content

Commit 321c060

Browse files
authored
Resolve incorrect media type (#4254)
1 parent c21994e commit 321c060

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rest_framework/response.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,13 @@ def __init__(self, data=None, status=None,
5151
@property
5252
def rendered_content(self):
5353
renderer = getattr(self, 'accepted_renderer', None)
54-
media_type = getattr(self, 'accepted_media_type', None)
5554
context = getattr(self, 'renderer_context', None)
5655

5756
assert renderer, ".accepted_renderer not set on Response"
58-
assert media_type, ".accepted_media_type not set on Response"
5957
assert context, ".renderer_context not set on Response"
6058
context['response'] = self
6159

60+
media_type = renderer.media_type
6261
charset = renderer.charset
6362
content_type = self.content_type
6463

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy