Mercurial > p > roundup > code
diff roundup/roundupdb.py @ 3986:68accc7d4b69
indexerror when there are no messages to the issue
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 07 Aug 2008 06:31:16 +0000 |
| parents | 642201ee1d75 |
| children | ef0b4396888a |
line wrap: on
line diff
--- a/roundup/roundupdb.py Thu Aug 07 06:21:07 2008 +0000 +++ b/roundup/roundupdb.py Thu Aug 07 06:31:16 2008 +0000 @@ -16,7 +16,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundupdb.py,v 1.138 2008-01-08 20:58:31 richard Exp $ +# $Id: roundupdb.py,v 1.139 2008-08-07 06:31:16 richard Exp $ """Extending hyperdb with types specific to issue-tracking. """ @@ -422,7 +422,9 @@ # Default the reply to the first message msgs = self.get(nodeid, 'messages') # Assume messages are sorted by increasing message number here - if msgs[0] != nodeid: + # If the issue is just being created, and the submitter didn't + # provide a message, then msgs will be empty. + if msgs and msgs[0] != nodeid: inreplyto = messages.get(msgs[0], 'messageid') if inreplyto: writer.addheader('In-Reply-To', inreplyto)
