diff roundup/roundupdb.py @ 460:9c895b44240a

take a copy of the node dict... so that the subsequent set operation doesn't modify the oldvalues structure
author Richard Jones <richard@users.sourceforge.net>
date Sun, 16 Dec 2001 10:53:38 +0000
parents fcda73536034
children b579418f7ed1
line wrap: on
line diff
--- a/roundup/roundupdb.py	Sat Dec 15 23:51:01 2001 +0000
+++ b/roundup/roundupdb.py	Sun Dec 16 10:53:38 2001 +0000
@@ -15,13 +15,13 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: roundupdb.py,v 1.32 2001-12-15 23:48:35 richard Exp $
+# $Id: roundupdb.py,v 1.33 2001-12-16 10:53:37 richard Exp $
 
 __doc__ = """
 Extending hyperdb with types specific to issue-tracking.
 """
 
-import re, os, smtplib, socket
+import re, os, smtplib, socket, copy
 import mimetools, MimeWriter, cStringIO
 import base64, mimetypes
 
@@ -107,7 +107,9 @@
             raise KeyError, '"creation" and "activity" are reserved'
         for audit in self.auditors['set']:
             audit(self.db, self, nodeid, propvalues)
-        oldvalues = self.db.getnode(self.classname, nodeid)
+        # take a copy of the node dict so that the subsequent set
+        # operation doesn't modify the oldvalues structure
+        oldvalues = copy.deepcopy(self.db.getnode(self.classname, nodeid))
         hyperdb.Class.set(self, nodeid, **propvalues)
         for react in self.reactors['set']:
             react(self.db, self, nodeid, oldvalues)
@@ -504,6 +506,10 @@
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.32  2001/12/15 23:48:35  richard
+# Added ROUNDUPDBSENDMAILDEBUG so one can test the sendmail method without
+# actually sending mail :)
+#
 # Revision 1.31  2001/12/15 19:24:39  rochecompaan
 #  . Modified cgi interface to change properties only once all changes are
 #    collected, files created and messages generated.

Roundup Issue Tracker: http://roundup-tracker.org/