Skip to content

Commit

Permalink
Fix filter_iter so that exception is caught
Browse files Browse the repository at this point in the history
  • Loading branch information
schlatterbeck committed Feb 27, 2025
1 parent e813e6e commit 44dfa19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion roundup/backends/back_postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,8 @@ def filter(self, *args, **kw):
def filter_iter(self, *args, **kw):
self.db.sql('savepoint sp')
try:
return rdbms_common.Class.filter_iter(self, *args, **kw)
for v in rdbms_common.Class.filter_iter(self, *args, **kw):
yield v
except psycopg2.errors.DataError as err:
self.db.sql('rollback to savepoint sp')
raise hyperdb.HyperdbValueError(str (err).split('\n')[0])
Expand Down

0 comments on commit 44dfa19

Please sign in to comment.