Skip to content

Commit

Permalink
fix: search uses literal string
Browse files Browse the repository at this point in the history
  • Loading branch information
xnought committed Dec 1, 2023
1 parent 3617892 commit 801bd1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ def search_entries(query: str):
try:
entries_sql = db.execute_return(
"""SELECT name, length, mass FROM proteins
WHERE name ILIKE \'%{}%\'""".format(query)
WHERE name ILIKE %s""",
[f"%{query}%"],
)
log.warn("log test")
log.warn(entries_sql)

# if we got a result back
Expand Down

0 comments on commit 801bd1d

Please sign in to comment.