Code

change messages weren't being saved when there was no-one on the nosy list.
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 29 Aug 2001 05:30:49 +0000 (05:30 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 29 Aug 2001 05:30:49 +0000 (05:30 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@245 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi_client.py

index baa72939fef9e353b0b5f558e783a30b9589ce46..97d8346ff29a346ae01923c0a536ddd87f60d9d7 100644 (file)
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: cgi_client.py,v 1.24 2001-08-29 04:49:39 richard Exp $
+# $Id: cgi_client.py,v 1.25 2001-08-29 05:30:49 richard Exp $
 
 import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes
 
@@ -276,20 +276,20 @@ class Client:
                     link = self.db.classes[link]
                     link.set(nodeid, **{property: nid})
 
-        # generate an edit message - nosyreactor will send it
-        # don't bother if there's no messages or nosy list
+        # generate an edit message
+        # don't bother if there's no messages or nosy list 
         props = cl.getprops()
-        nosy = len(cl.get(nid, 'nosy', []))
-        if (nosy and props.has_key('messages') and
+        note = None
+        if self.form.has_key('__note'):
+            note = self.form['__note']
+            note = note.value
+        send = len(cl.get(nid, 'nosy', [])) or note
+        if (send and props.has_key('messages') and
                 isinstance(props['messages'], hyperdb.Multilink) and
                 props['messages'].classname == 'msg'):
 
             # handle the note
-            note = None
-            if self.form.has_key('__note'):
-                note = self.form['__note']
-            if note is not None and note.value:
-                note = note.value
+            if note:
                 if '\n' in note:
                     summary = re.split(r'\n\r?', note)[0]
                 else:
@@ -513,6 +513,9 @@ def parsePropsFromForm(cl, form, nodeid=0):
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.24  2001/08/29 04:49:39  richard
+# didn't clean up fully after debugging :(
+#
 # Revision 1.23  2001/08/29 04:47:18  richard
 # Fixed CGI client change messages so they actually include the properties
 # changed (again).