Skip to content

Commit df16a67

Browse files
committed
remove redundant call for super process_request
1 parent 5e2a23b commit df16a67

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

debug_toolbar/panels/redirects.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,17 @@ def _process_response(self, response):
3333
response.render()
3434
return response
3535

36-
async def aprocess_request(self, request):
37-
response = await super().process_request(request)
36+
async def aprocess_request(self, request, response_coroutine):
37+
"""
38+
Async version of process_request. used for accessing the response
39+
by awaiting it when running in ASGI.
40+
"""
41+
42+
response = await response_coroutine
3843
return self._process_response(response)
3944

4045
def process_request(self, request):
4146
response = super().process_request(request)
4247
if iscoroutine(response):
43-
return self.aprocess_request(request)
48+
return self.aprocess_request(request, response)
4449
return self._process_response(response)

0 commit comments

Comments
 (0)