From 5c02a6b0f455e858db01aa9271cefc15736de86a Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 5 Aug 2018 13:06:26 -0700 Subject: [PATCH] Handle None back from that plugin --- datasette/views/table.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/datasette/views/table.py b/datasette/views/table.py index 88b6748e..0ab1f037 100644 --- a/datasette/views/table.py +++ b/datasette/views/table.py @@ -350,9 +350,13 @@ class TableView(RowTableShared): # filter_arguments plugin hook support for awaitable_fn in pm.hook.table_filter(): + if awaitable_fn is None: + continue extras = await awaitable_fn( view=self, name=name, table=table, request=request ) + if extras is None: + continue human_description_extras.extend(extras.human_description_extras) where_clauses.extend(extras.where_clauses) params.update(extras.params)