diff --git a/datasette/app.py b/datasette/app.py index f43ef666..b810af86 100644 --- a/datasette/app.py +++ b/datasette/app.py @@ -419,7 +419,6 @@ class RowTableShared(BaseView): async def display_columns_and_rows(self, database, table, description, rows, link_column=False, expand_foreign_keys=True): "Returns columns, rows for specified table - including fancy foreign key treatment" info = self.ds.inspect()[database] - database_hash = info['hash'][:HASH_LENGTH] columns = [r[0] for r in description] tables = info['tables'] table_info = tables.get(table) or {} @@ -459,9 +458,8 @@ class RowTableShared(BaseView): cells.append({ 'column': 'Link', 'value': jinja2.Markup( - '{flat_pks}'.format( + '{flat_pks}'.format( database=database, - database_hash=database_hash, table=urllib.parse.quote_plus(table), flat_pks=path_from_row_pks(row, pks, not pks), ) @@ -471,9 +469,8 @@ class RowTableShared(BaseView): if (column, value) in expanded: other_table, label = expanded[(column, value)] display_value = jinja2.Markup( - '{label} {id}'.format( + '{label} {id}'.format( database=database, - database_hash=database_hash, table=urllib.parse.quote_plus(other_table), id=str(jinja2.escape(value)), label=str(jinja2.escape(label)), diff --git a/tests/test_app.py b/tests/test_app.py index a1691dec..473cc8d3 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -448,15 +448,15 @@ def test_table_html_simple_primary_key(app_client): ] == [th.string for th in table.select('thead th')] assert [ [ - '