mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Made register_output_renderer callback optionally awaitable, closes #776
This commit is contained in:
parent
52c4387c7d
commit
57f48b8416
4 changed files with 17 additions and 6 deletions
|
|
@ -403,6 +403,8 @@ class DataView(BaseView):
|
|||
args=request.args,
|
||||
data=data,
|
||||
)
|
||||
if asyncio.iscoroutine(result):
|
||||
result = await result
|
||||
if result is None:
|
||||
raise NotFound("No data")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue