Fixed 500 error on homepage

This commit is contained in:
Simon Willison 2019-05-09 20:58:19 -07:00
commit de005b9b7d

View file

@ -57,7 +57,9 @@ class IndexView(RenderMixin):
"tables_count": len(tables),
"tables_more": len(tables) > 5,
"table_rows_sum": sum((t["count"] or 0) for t in tables.values()),
"hidden_table_rows_sum": sum(t["count"] for t in hidden_tables),
"hidden_table_rows_sum": sum(
t["count"] for t in hidden_tables if t["count"] is not None
),
"hidden_tables_count": len(hidden_tables),
"views_count": len(views),
}