From 9199945a1bcec4852e1cb866eb3642614dd32a48 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 16 Nov 2017 06:46:49 -0800 Subject: [PATCH] Fixed 500 on views page Bug introduced in a4af532a31ece7095d710a1f5abb39ea93fe003f Refs 85 --- datasette/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/datasette/app.py b/datasette/app.py index f56695ff..3a7854a0 100644 --- a/datasette/app.py +++ b/datasette/app.py @@ -468,7 +468,9 @@ class TableView(BaseView): display_columns = display_columns[1:] rows = list(rows) info = self.ds.inspect() - table_rows = info[name]['tables'].get(table)['count'] + table_rows = None + if not is_view: + table_rows = info[name]['tables'][table]['count'] next_value = None next_url = None if len(rows) > self.page_size: