diff options
| author | bwarsaw | 2007-04-03 02:03:18 +0000 |
|---|---|---|
| committer | bwarsaw | 2007-04-03 02:03:18 +0000 |
| commit | 43f516b5d72a3d20f13957cee7f9c8a6699120ad (patch) | |
| tree | 98078bf1e0796a187df7584440c35ca3b50fdcf7 /Mailman/database/listdata.py | |
| parent | 6362c6e0a021eb5939d14b8ae4a2ed7b80371580 (diff) | |
| download | mailman-43f516b5d72a3d20f13957cee7f9c8a6699120ad.tar.gz mailman-43f516b5d72a3d20f13957cee7f9c8a6699120ad.tar.zst mailman-43f516b5d72a3d20f13957cee7f9c8a6699120ad.zip | |
Diffstat (limited to 'Mailman/database/listdata.py')
| -rw-r--r-- | Mailman/database/listdata.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Mailman/database/listdata.py b/Mailman/database/listdata.py index 92a2d070a..05ea967ff 100644 --- a/Mailman/database/listdata.py +++ b/Mailman/database/listdata.py @@ -173,7 +173,13 @@ def make_table(metadata, tables): class MailListMapperExtension(MapperExtension): def populate_instance(self, mapper, context, row, mlist, ikey, isnew): - if isnew: + # isnew doesn't really seem to give us what we want. Specifically, if + # we expire the MailList object from the session, we'll get called + # with populate_instance(..., isnew=True) when the object is reloaded + # from the database. We'll still check isnew, but we'll also check to + # make sure there's no _memberadaptor attribute, since that is set in + # the InitTempVars() method. + if isnew and not hasattr(mlist, '_memberadaptor'): # Get the list name and host name -- which are required by # InitTempVars() from the row data. list_name = row['listdata_list_name'] |
