Skip to content

Commit 90168f4

Browse files
author
Richard Jones
committed
Fix incorrect labelling of a change as a "new submission".
1 parent 009c77a commit 90168f4

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

roundup/roundupdb.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: roundupdb.py,v 1.133 2007-09-16 02:45:11 jpend Exp $
19+
# $Id: roundupdb.py,v 1.134 2007-11-04 06:11:18 richard Exp $
2020

2121
"""Extending hyperdb with types specific to issue-tracking.
2222
"""
@@ -304,8 +304,7 @@ def send_message(self, nodeid, msgid, note, sendto, from_address=None,
304304

305305
# add author information
306306
if authid and self.db.config.MAIL_ADD_AUTHORINFO:
307-
if len(self.get(nodeid,'messages')) == 1:
308-
307+
if msgid and len(self.get(nodeid, 'messages')) == 1:
309308
m.append(_("New submission from %(authname)s%(authaddr)s:")
310309
% locals())
311310
elif msgid:

test/test_mailgw.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# but WITHOUT ANY WARRANTY; without even the implied warranty of
99
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1010
#
11-
# $Id: test_mailgw.py,v 1.89 2007-09-12 21:11:14 jpend Exp $
11+
# $Id: test_mailgw.py,v 1.90 2007-11-04 06:11:19 richard Exp $
1212

1313
# TODO: test bcc
1414

@@ -447,14 +447,13 @@ def testPropertyChangeOnly(self):
447447
self.db.commit()
448448
self.db.issue.nosymessage('1', None, oldvalues)
449449

450-
451450
new_mail = ""
452451
for line in self._get_mail().split("\n"):
453452
if "Message-Id: " in line:
454453
continue
455454
if "Date: " in line:
456455
continue
457-
new_mail+=line+"\n"
456+
new_mail += line+"\n"
458457

459458
self.compareMessages(new_mail, """
460459
@@ -482,7 +481,7 @@ def testPropertyChangeOnly(self):
482481
<http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1>
483482
_______________________________________________________________________
484483
""")
485-
484+
486485

487486
#
488487
# FOLLOWUP TITLE MATCH

0 commit comments

Comments
 (0)