Skip to content

Commit

Permalink
Fix SQL requests missing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jocelynj authored and frodrigo committed Apr 11, 2024
1 parent 09979bb commit f03209b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/query_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def _items(
FROM
items
WHERE
1 = 1"""
1 = 1 """
+ ("AND item = $1" if item is not None else "")
+ """
ORDER BY
Expand Down Expand Up @@ -137,11 +137,11 @@ async def _items(
FROM
class
WHERE
1 = 1"""
1 = 1 """
params = 0
if item is not None:
params += 1
sql += f"AND item = ${params}"
sql += f"AND item = ${params} "
if classs is not None:
params += 1
sql += f"AND class = ${params}"
Expand Down

0 comments on commit f03209b

Please sign in to comment.