Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with JSONP of errors on streamed output.
If a callback variable was supplied for a view that errors (e.g. no polygons), then this led to a cacheable (200) response which contained a generator function (iterencode) in its _closable_objects attribute. The cache could not then pickle this attribute and so raised an exception. This was okay in previous versions because of a side effect of the smart_bytes workaround for Django bug #24240 that was in place; this was removed when support for Django prior to 1.8 was dropped. Fix the issue by using an identity map (as map has no close() method and so is not added to _closable_objects).
- Loading branch information