Skip to content

Commit f06abb9

Browse files
author
Richard Jones
committed
couple more msgid == None fixes
1 parent e9c0db9 commit f06abb9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

roundup/roundupdb.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: roundupdb.py,v 1.114 2004-10-08 05:44:33 richard Exp $
18+
# $Id: roundupdb.py,v 1.115 2004-10-08 05:51:00 richard Exp $
1919

2020
"""Extending hyperdb with types specific to issue-tracking.
2121
"""
@@ -224,7 +224,7 @@ def good_recipient(userid):
224224
# If we have new recipients, update the message's recipients
225225
# and send the mail.
226226
if sendto or bcc_sendto:
227-
if msgid:
227+
if msgid is not None:
228228
self.db.msg.set(msgid, recipients=recipients)
229229
self.send_message(nodeid, msgid, note, sendto, from_address,
230230
bcc_sendto)
@@ -315,7 +315,10 @@ def send_message(self, nodeid, msgid, note, sendto, from_address=None,
315315
content_encoded = content_encoded.getvalue()
316316

317317
# get the files for this message
318-
message_files = msgid and messages.get(msgid, 'files') or None
318+
if msgid is None:
319+
message_files = None
320+
else:
321+
message_files = messages.get(msgid, 'files')
319322

320323
# make sure the To line is always the same (for testing mostly)
321324
sendto.sort()

0 commit comments

Comments
 (0)