diff options
| author | userimack <mahendra.k12@gmail.com> | 2016-01-23 22:17:07 +0530 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-01-25 14:23:43 -0500 |
| commit | 60586dd7379b295b72d8af4e03423c286913b5e8 (patch) | |
| tree | 6f834957ea76305fbcda40e23e836077890d36b8 /django/utils/decorators.py | |
| parent | abc0777b63057e2ff97eee2ff184356051e14c47 (diff) | |
Fixed #26125 -- Fixed E731 flake warnings.
Diffstat (limited to 'django/utils/decorators.py')
| -rw-r--r-- | django/utils/decorators.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/utils/decorators.py b/django/utils/decorators.py index 87a702d3d8..7ba31a32e3 100644 --- a/django/utils/decorators.py +++ b/django/utils/decorators.py @@ -159,7 +159,8 @@ def make_middleware_decorator(middleware_class): # Defer running of process_response until after the template # has been rendered: if hasattr(middleware, 'process_response'): - callback = lambda response: middleware.process_response(request, response) + def callback(response): + return middleware.process_response(request, response) response.add_post_render_callback(callback) else: if hasattr(middleware, 'process_response'): |
