Fix for TableNotFound, refs #2359

This commit is contained in:
Simon Willison 2024-06-21 16:09:20 -07:00
commit 7316dd4ac6
5 changed files with 10 additions and 12 deletions

View file

@ -1628,9 +1628,7 @@ class Datasette:
if not table_exists:
is_view = await db.view_exists(table_name)
if not (table_exists or is_view):
raise TableNotFound(
"Table not found: {}".format(table_name), db.name, table_name
)
raise TableNotFound(db.name, table_name)
return ResolvedTable(db, table_name, is_view)
async def resolve_row(self, request):