Skip to content

Commit f7d74ea

Browse files
committed
Use reason_phrase property rather than non-public attribute
1 parent 466426e commit f7d74ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(
4949
self.exception = exception
5050
self.content_type = content_type
5151
if reason:
52-
self._reason_phrase = f"{self.status_text} ({reason})"
52+
self.reason_phrase = f"{self.status_text} ({reason})"
5353

5454
if headers:
5555
for name, value in headers.items():

0 commit comments

Comments
 (0)