fix: orphaned variable

v0.2
rrr-marble 4 years ago
parent 7aa5b423e5
commit 94570c0e0a

@ -57,7 +57,6 @@ def get_item_by_detailed_description(
# hardcode russian for now
# built-in postgress websearch_to_tsquery() is good
# https://www.postgresql.org/docs/11/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIES
# TODO: add requested search columns [0]
items_table = inspect(models.Item).local_table
result = db.query(models.Item)
@ -65,7 +64,7 @@ def get_item_by_detailed_description(
if query.main_query is not None:
result = result.filter(
items_table.c.geodata_search_ts.op("@@")(
func.websearch_to_tsquery('"russian"', main_query)
func.websearch_to_tsquery('"russian"', query.main_query)
)
)
# filter by additionalfields (if present)

Loading…
Cancel
Save