Skip to content

Commit 998041a

Browse files
committed
another simplification of middleware
1 parent 5eb5818 commit 998041a

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

tests/test_app/middleware.py

+2-9
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,5 @@ def __init__(self, get_response):
1818
if iscoroutinefunction(self.get_response):
1919
markcoroutinefunction(self)
2020

21-
def __call__(self, request):
22-
if iscoroutinefunction(self.get_response):
23-
24-
async def async_call():
25-
return await self.get_response(request)
26-
27-
return async_call()
28-
29-
return self.get_response(request)
21+
async def __call__(self, request):
22+
return await self.get_response(request)

0 commit comments

Comments
 (0)