Mercurial > p > roundup > code
diff roundup/mailgw.py @ 4503:9f488541802f
Yet another fix to the mail gateway...
...messages got *all* files of an issue, not just the new ones. Thanks
to Rafal Bisingier for reporting and proposing a fix. The regression
test was updated. Fix version numbers in upgrade documentation, the
file-unlink defect was in 1.4.17 not 1.4.16. Thanks to Rafal
Bisingier.
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Wed, 01 Jun 2011 12:49:47 +0000 |
| parents | 8df9492c2746 |
| children | a00e0e73bb26 |
line wrap: on
line diff
--- a/roundup/mailgw.py Mon May 30 09:09:40 2011 +0000 +++ b/roundup/mailgw.py Wed Jun 01 12:49:47 2011 +0000 @@ -549,6 +549,7 @@ self.nodeid = None self.author = None self.recipients = None + self.msg_props = {} self.props = None self.content = None self.attachments = None @@ -1052,6 +1053,7 @@ 'You are not permitted to add files to %(classname)s.' ) % self.__dict__ + self.msg_props['files'] = files if self.nodeid: # extend the existing files list fileprop = self.cl.get(self.nodeid, 'files') @@ -1066,6 +1068,7 @@ if not self.properties.has_key('messages'): return msg_props = self.mailgw.get_class_arguments('msg') + self.msg_props.update (msg_props) # Get the message ids inreplyto = self.message.getheader('in-reply-to') or '' @@ -1094,8 +1097,7 @@ message_id = self.db.msg.create(author=self.author, recipients=self.recipients, date=date.Date('.'), summary=summary, content=content, - files=self.props.get('files',[]), - messageid=messageid, inreplyto=inreplyto, **msg_props) + messageid=messageid, inreplyto=inreplyto, **self.msg_props) except exceptions.Reject, error: raise MailUsageError, _(""" Mail message was rejected by a detector.
