mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-25 23:50:01 +03:00
Wrapped func with sync_to_async
This commit is contained in:
parent
ec1d7547fd
commit
de6df46a81
|
@ -564,7 +564,7 @@ class APIView(View):
|
|||
|
||||
if getattr(self, 'view_is_async', False):
|
||||
async def handler():
|
||||
return func()
|
||||
return await sync_to_async(func)()
|
||||
else:
|
||||
def handler():
|
||||
return func()
|
||||
|
|
Loading…
Reference in New Issue
Block a user