0001-sql-work-around-crash-with-rank-ordering-66032.patch
tests/api/test_formdata.py | ||
---|---|---|
864 | 864 |
assert len(resp.json) == 2 |
865 | 865 |
assert [int(x['id']) for x in resp.json] == [formdata3.id, formdata1.id] |
866 | 866 | |
867 |
# check fts with accent (#66032 for instance) |
|
868 |
resp = get_app(pub).get(sign_uri('/api/forms/test/list?full=on&q=fée', user=local_user)) |
|
869 |
assert len(resp.json) == 2 |
|
870 |
assert [int(x['id']) for x in resp.json] == [formdata3.id, formdata1.id] |
|
871 | ||
867 | 872 | |
868 | 873 |
def test_api_list_formdata_unknown_filter(pub, local_user): |
869 | 874 |
pub.role_class.wipe() |
wcs/sql.py | ||
---|---|---|
2372 | 2372 |
pass |
2373 | 2373 |
else: |
2374 | 2374 |
sql_statement += ' ORDER BY ts_rank(fts, plainto_tsquery(%%(c%s)s)) DESC' % id(fts.value) |
2375 |
if not id(fts.value) in parameters: |
|
2376 |
parameters[id(fts.value)] = fts.value |
|
2375 | 2377 |
else: |
2376 | 2378 |
sql_statement += cls.get_order_by_clause(order_by) |
2377 | 2379 |
cur.execute(sql_statement, parameters) |
2378 |
- |