more pythonic example

This commit is contained in:
Daniel Chimeno 2018-01-25 12:41:35 +01:00
parent 1664588500
commit 812772a31d

View File

@ -67,7 +67,7 @@ In order to alter the style of the response, you could write the following custo
response = exception_handler(exc, context)
# Now add the HTTP status code to the response.
if response is not None:
if response:
response.data['status_code'] = response.status_code
return response