base_search_fuzzy: black, isort, prettier
parent
043b6871d3
commit
af8562c241
|
@ -5,7 +5,7 @@
|
||||||
"name": "Fuzzy Search",
|
"name": "Fuzzy Search",
|
||||||
"summary": "Fuzzy search with the PostgreSQL trigram extension",
|
"summary": "Fuzzy search with the PostgreSQL trigram extension",
|
||||||
"category": "Uncategorized",
|
"category": "Uncategorized",
|
||||||
"version": "13.0.1.0.0",
|
"version": "14.0.1.0.0",
|
||||||
"website": "https://github.com/OCA/server-tools",
|
"website": "https://github.com/OCA/server-tools",
|
||||||
"author": "bloopark systems GmbH & Co. KG, "
|
"author": "bloopark systems GmbH & Co. KG, "
|
||||||
"ForgeFlow, "
|
"ForgeFlow, "
|
||||||
|
|
|
@ -25,7 +25,9 @@ def patch_leaf_trgm(method):
|
||||||
if left in model._fields:
|
if left in model._fields:
|
||||||
column = "{}.{}".format(table_alias, expression._quote(left))
|
column = "{}.{}".format(table_alias, expression._quote(left))
|
||||||
query = "({} {} {})".format(
|
query = "({} {} {})".format(
|
||||||
column, sql_operator, model._fields[left].column_format,
|
column,
|
||||||
|
sql_operator,
|
||||||
|
model._fields[left].column_format,
|
||||||
)
|
)
|
||||||
elif left in models.MAGIC_COLUMNS:
|
elif left in models.MAGIC_COLUMNS:
|
||||||
query = '({}."{}" {} %s)'.format(table_alias, left, sql_operator)
|
query = '({}."{}" {} %s)'.format(table_alias, left, sql_operator)
|
||||||
|
|
Loading…
Reference in New Issue