From eef73255db608785a55c055cbbfb800603671ff6 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 23 Sep 2014 09:47:26 -0400 Subject: Update some comments. --- src/mailman/model/requests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- cgit v1.3.1