Skip to content

Commit 0ab0dec

Browse files
committed
Rollback cursor when bounds checking fails; #17
1 parent 8931b5f commit 0ab0dec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

postgres.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def _some(self, sql, parameters=None, lo=0, hi=1):
405405
# rare case where this is wanted directly. It's here to make one and
406406
# one_or_zero DRY. Help yourself to it now that you've found it. :^)
407407

408-
with self.get_cursor() as txn:
408+
with self.get_transaction() as txn:
409409
txn.execute(sql, parameters)
410410

411411
if txn.rowcount < lo:

0 commit comments

Comments
 (0)