Skip to content

Commit

Permalink
FIX: allow FormHandler query: ends with semicolon
Browse files Browse the repository at this point in the history
  • Loading branch information
sanand0 committed Oct 23, 2023
1 parent c55e789 commit 74b5315
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gramex/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def filter(
# If query = "SELECT * FROM table WHERE x=:x" and we bind with bindparam('x'),
# we can NEVER bind with x as bindparam('x', expanding=True) without restarting.
# Therefore, create a new query each time.
sql = sa.text(f'{query}; -- {time.time()}')
sql = sa.text(f'{query.rstrip().rstrip(";")}; -- {time.time()}')
all_params = {}
for key, vals in args.items():
conv, expanding = _argstype(argstype, key, str)
Expand Down

0 comments on commit 74b5315

Please sign in to comment.