# HG changeset patch # User Richard Jones # Date 1051410548 0 # Node ID 0b30d6f0ec244be9eb53c5ec9064e506c62f0ef8 # Parent 6d1af2e441f41f924c655da1fc5cf7566ff2a43a handle missing addresses on users [SF#724537] diff -r 6d1af2e441f4 -r 0b30d6f0ec24 CHANGES.txt --- a/CHANGES.txt Thu Apr 24 07:51:52 2003 +0000 +++ b/CHANGES.txt Sun Apr 27 02:29:08 2003 +0000 @@ -12,6 +12,7 @@ - email file attachments added to issue files list (sf bug 711501) - added socket timeout to attempt to prevent stuck processes (sf bug 665487) - email registered users shouldn't be able to log in (sf bug 714673) +- handle missing addresses on users (sf bug 724537) 2003-02-27 0.5.6 diff -r 6d1af2e441f4 -r 0b30d6f0ec24 roundup/roundupdb.py --- a/roundup/roundupdb.py Thu Apr 24 07:51:52 2003 +0000 +++ b/roundup/roundupdb.py Sun Apr 27 02:29:08 2003 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundupdb.py,v 1.75 2002-12-11 01:52:20 richard Exp $ +# $Id: roundupdb.py,v 1.75.2.1 2003-04-27 02:29:07 richard Exp $ __doc__ = """ Extending hyperdb with types specific to issue-tracking. @@ -110,9 +110,16 @@ # possibly send the message to the author, as long as they aren't # anonymous - if (self.db.config.MESSAGES_TO_AUTHOR == 'yes' and - users.get(authid, 'username') != 'anonymous'): - sendto.append(authid) + if (users.get(authid, 'username') != 'anonymous' and + not r.has_key(authid)): + if self.db.config.MESSAGES_TO_AUTHOR == 'yes': + # make sure they have an address + add = users.get(authid, 'address') + if add: + # send it to them + sendto.append(add) + recipients.append(authid) + r[authid] = 1 # now figure the nosy people who weren't recipients @@ -125,9 +132,12 @@ continue # make sure they haven't seen the message already if not r.has_key(nosyid): - # send it to them - sendto.append(nosyid) - recipients.append(nosyid) + # make sure they have an address + add = users.get(nosyid, 'address') + if add: + # send it to them + sendto.append(add) + recipients.append(nosyid) # generate a change note if oldvalues: @@ -137,9 +147,6 @@ # we have new recipients if sendto: - # map userids to addresses - sendto = [users.get(i, 'address') for i in sendto] - # update the message's recipients list messages.set(msgid, recipients=recipients)