mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
functools.wraps to help investigate #1517
This commit is contained in:
parent
6e971b4ac1
commit
3025505515
1 changed files with 2 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import asyncio
|
|||
import asgi_csrf
|
||||
import collections
|
||||
import datetime
|
||||
import functools
|
||||
import glob
|
||||
import hashlib
|
||||
import httpx
|
||||
|
|
@ -1354,6 +1355,7 @@ def _cleaner_task_str(task):
|
|||
|
||||
|
||||
def wrap_view(view_fn, datasette):
|
||||
@functools.wraps(view_fn)
|
||||
async def async_view_fn(request, send):
|
||||
if inspect.iscoroutinefunction(view_fn):
|
||||
response = await async_call_with_supported_arguments(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue