mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
Merge pull request #2492 from tomchristie/empty_closable_objects
_closable_objects as an empty list, not deleted
This commit is contained in:
commit
a89e05dc73
|
@ -86,8 +86,9 @@ class Response(SimpleTemplateResponse):
|
|||
state = super(Response, self).__getstate__()
|
||||
for key in (
|
||||
'accepted_renderer', 'renderer_context', 'resolver_match',
|
||||
'client', 'request', 'wsgi_request', '_closable_objects'
|
||||
'client', 'request', 'wsgi_request'
|
||||
):
|
||||
if key in state:
|
||||
del state[key]
|
||||
state['_closable_objects'] = []
|
||||
return state
|
||||
|
|
Loading…
Reference in New Issue
Block a user