Skip to content

Commit 21d24f0

Browse files
author
Richard Jones
committed
change messages weren't being saved when there was no-one on the nosy list.
1 parent 1c82bf5 commit 21d24f0

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

roundup/cgi_client.py

Lines changed: 13 additions & 10 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: cgi_client.py,v 1.24 2001-08-29 04:49:39 richard Exp $
18+
# $Id: cgi_client.py,v 1.25 2001-08-29 05:30:49 richard Exp $
1919

2020
import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes
2121

@@ -276,20 +276,20 @@ def _post_editnode(self, nid, changes=None):
276276
link = self.db.classes[link]
277277
link.set(nodeid, **{property: nid})
278278

279-
# generate an edit message - nosyreactor will send it
280-
# don't bother if there's no messages or nosy list
279+
# generate an edit message
280+
# don't bother if there's no messages or nosy list
281281
props = cl.getprops()
282-
nosy = len(cl.get(nid, 'nosy', []))
283-
if (nosy and props.has_key('messages') and
282+
note = None
283+
if self.form.has_key('__note'):
284+
note = self.form['__note']
285+
note = note.value
286+
send = len(cl.get(nid, 'nosy', [])) or note
287+
if (send and props.has_key('messages') and
284288
isinstance(props['messages'], hyperdb.Multilink) and
285289
props['messages'].classname == 'msg'):
286290

287291
# handle the note
288-
note = None
289-
if self.form.has_key('__note'):
290-
note = self.form['__note']
291-
if note is not None and note.value:
292-
note = note.value
292+
if note:
293293
if '\n' in note:
294294
summary = re.split(r'\n\r?', note)[0]
295295
else:
@@ -513,6 +513,9 @@ def parsePropsFromForm(cl, form, nodeid=0):
513513

514514
#
515515
# $Log: not supported by cvs2svn $
516+
# Revision 1.24 2001/08/29 04:49:39 richard
517+
# didn't clean up fully after debugging :(
518+
#
516519
# Revision 1.23 2001/08/29 04:47:18 richard
517520
# Fixed CGI client change messages so they actually include the properties
518521
# changed (again).

0 commit comments

Comments
 (0)