kopia lustrzana https://github.com/simonw/datasette
Fix for combining ?_search_x and ?_searchmode=raw, closes #1134
rodzic
b09818e8f3
commit
e48f7f1bfe
|
@ -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"
|
||||
|
|
|
@ -1035,6 +1035,13 @@ def test_sortable_columns_metadata(app_client):
|
|||
[2, "terry dog", "sara weasel", "puma"],
|
||||
],
|
||||
),
|
||||
(
|
||||
# _searchmode=raw combined with _search_COLUMN
|
||||
"/fixtures/searchable.json?_search_text2=te*&_searchmode=raw",
|
||||
[
|
||||
[1, "barry cat", "terry dog", "panther"],
|
||||
],
|
||||
),
|
||||
(
|
||||
"/fixtures/searchable.json?_search=weasel",
|
||||
[[2, "terry dog", "sara weasel", "puma"]],
|
||||
|
|
Ładowanie…
Reference in New Issue