got a lead
gitea/wcs/pipeline/head There was a failure building this commit Details

This commit is contained in:
Pierre Ducroquet 2024-04-16 17:30:14 +02:00
parent 0263dfda62
commit aa2c7b3fe8
2 changed files with 4 additions and 3 deletions

View File

@ -429,8 +429,8 @@ def test_backoffice_submission_formdef_list_search(pub, local_user, access, auth
resp = get_url('/api/formdefs/?backoffice-submission=on&q=test')
assert len(resp.json['data']) == 2
resp = get_url('/api/formdefs/?backoffice-submission=on&q=tes')
assert len(resp.json['data']) == 2
#resp = get_url('/api/formdefs/?backoffice-submission=on&q=tes')
#assert len(resp.json['data']) == 2
resp = get_url('/api/formdefs/?backoffice-submission=on&q=xyz')
assert len(resp.json['data']) == 0

View File

@ -5115,7 +5115,8 @@ class SearchableFormDef(SqlMixin):
def search(cls, obj_type, string):
_, cur = get_connection_and_cursor()
cur.execute(
'SELECT object_id FROM searchable_formdefs WHERE fts @@ wcs_tsquery(%s)',
### TEMP REVERT TO PINPOINT THE FTS ISSUE
'SELECT object_id FROM searchable_formdefs WHERE fts @@ plainto_tsquery(%s)',
(FtsMatch.get_fts_value(string),),
)
ids = [x[0] for x in cur.fetchall()]