Handle None back from that plugin

This commit is contained in:
Simon Willison 2018-08-05 13:06:26 -07:00
commit 5c02a6b0f4
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52

View file

@ -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)