mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-27 03:54:01 +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__()
|
state = super(Response, self).__getstate__()
|
||||||
for key in (
|
for key in (
|
||||||
'accepted_renderer', 'renderer_context', 'resolver_match',
|
'accepted_renderer', 'renderer_context', 'resolver_match',
|
||||||
'client', 'request', 'wsgi_request', '_closable_objects'
|
'client', 'request', 'wsgi_request'
|
||||||
):
|
):
|
||||||
if key in state:
|
if key in state:
|
||||||
del state[key]
|
del state[key]
|
||||||
|
state['_closable_objects'] = []
|
||||||
return state
|
return state
|
||||||
|
|
Loading…
Reference in New Issue
Block a user