diff options
| author | Barry Warsaw | 2014-09-23 09:47:26 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2014-09-23 09:47:26 -0400 |
| commit | eef73255db608785a55c055cbbfb800603671ff6 (patch) | |
| tree | f7e0b4cd273fa24ad5c6048d39a4b8aa7521bc44 /src | |
| parent | ad7a26a4383fd9f0034e1e50d8f4207adb5aa9f3 (diff) | |
| download | mailman-eef73255db608785a55c055cbbfb800603671ff6.tar.gz mailman-eef73255db608785a55c055cbbfb800603671ff6.tar.zst mailman-eef73255db608785a55c055cbbfb800603671ff6.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/model/requests.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mailman/model/requests.py b/src/mailman/model/requests.py index 335e1e002..7f996dded 100644 --- a/src/mailman/model/requests.py +++ b/src/mailman/model/requests.py @@ -105,6 +105,9 @@ class ListRequests: data_hash = token request = _Request(key, request_type, self.mailing_list, data_hash) store.add(request) + # XXX The caller needs a valid id immediately, so flush the changes + # now to the SA transaction context. Otherwise .id would not be + # valid. Hopefully this has no unintended side-effects. store.flush() return request.id @@ -148,7 +151,7 @@ class _Request(Model): __tablename__ = 'request' - id = Column(Integer, primary_key=True)# TODO: ???, default=AutoReload) + id = Column(Integer, primary_key=True) key = Column(Unicode) request_type = Column(Enum(RequestType)) data_hash = Column(LargeBinary) |
