diff options
Diffstat (limited to 'src/mailman/database/postgresql.py')
| -rw-r--r-- | src/mailman/database/postgresql.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mailman/database/postgresql.py b/src/mailman/database/postgresql.py index e56ddaf38..ea6540721 100644 --- a/src/mailman/database/postgresql.py +++ b/src/mailman/database/postgresql.py @@ -44,8 +44,9 @@ class PostgreSQLDatabase(SABaseDatabase): # django-postgresql-how-to-reset-primary-key for table in tables: for column in table.primary_key: - if column.autoincrement and isinstance(column.type, Integer) \ - and not column.foreign_keys: + if (column.autoincrement + and isinstance(column.type, Integer) + and not column.foreign_keys): store.execute("""\ SELECT setval('"{0}_{1}_seq"', coalesce(max("{1}"), 1), max("{1}") IS NOT null) |
