Mercurial > p > roundup > code
diff roundup/backends/back_postgresql.py @ 8295:bbc99def147a
fix: issue2550815 - roundup-admin import for postgres causes id to be skipped.
Fixed code so that the id used to set the sequence
will be returned and not skipped. (Tom Ekberg diagnosed and
supplied the fix.)
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 19 Jan 2025 19:37:48 -0500 |
| parents | 8147f6deac9f |
| children | cfa7d43a3658 |
line wrap: on
line diff
--- a/roundup/backends/back_postgresql.py Sun Jan 19 19:29:17 2025 -0500 +++ b/roundup/backends/back_postgresql.py Sun Jan 19 19:37:48 2025 -0500 @@ -548,7 +548,7 @@ return str(self.cursor.fetchone()[0]) def setid(self, classname, setid): - sql = "select setval('_%s_ids', %s) from dual" % (classname, + sql = "select setval('_%s_ids', %s, false) from dual" % (classname, int(setid)) self.sql(sql)
