Rename ?_nofacets=1 to ?_nofacet=1, refs #1353

This commit is contained in:
Simon Willison 2021-06-01 08:55:28 -07:00
commit 8bde6c5461
5 changed files with 13 additions and 13 deletions

View file

@ -264,11 +264,11 @@ class DataView(BaseView):
async def as_csv(self, request, database, hash, **kwargs):
stream = request.args.get("_stream")
# Do not calculate facets:
if not request.args.get("_nofacets"):
if not request.args.get("_nofacet"):
if not request.query_string:
new_query_string = "_nofacets=1"
new_query_string = "_nofacet=1"
else:
new_query_string = request.query_string + "&_nofacets=1"
new_query_string = request.query_string + "&_nofacet=1"
new_scope = dict(
request.scope, query_string=new_query_string.encode("latin-1")
)

View file

@ -731,7 +731,7 @@ class TableView(RowTableShared):
)
)
if not request.args.get("_nofacets"):
if not request.args.get("_nofacet"):
for facet in facet_instances:
(
instance_facet_results,
@ -829,7 +829,7 @@ class TableView(RowTableShared):
self.ds.setting("suggest_facets")
and self.ds.setting("allow_facet")
and not _next
and not request.args.get("_nofacets")
and not request.args.get("_nofacet")
):
for facet in facet_instances:
suggested_facets.extend(await facet.suggest())