Fix for combining ?_search_x and ?_searchmode=raw, closes #1134

This commit is contained in:
Simon Willison 2020-12-09 11:56:44 -08:00
commit 6000d1a724
2 changed files with 10 additions and 1 deletions

View file

@ -443,7 +443,9 @@ class TableView(RowTableShared):
fts_table = fts_table or await db.fts_table(table)
fts_pk = special_args.get("_fts_pk", table_metadata.get("fts_pk", "rowid"))
search_args = dict(
pair for pair in special_args.items() if pair[0].startswith("_search")
pair
for pair in special_args.items()
if pair[0].startswith("_search") and pair[0] != "_searchmode"
)
search = ""
search_mode_raw = special_args.get("_searchmode") == "raw"