diff roundup/roundupdb.py @ 1814:ffba0a574b4e maint-0.6

Apply Error fix backported to main-0-6
author Andrey Lebedev <kedder@users.sourceforge.net>
date Thu, 18 Sep 2003 07:29:56 +0000
parents b3abda04a690
children 1d86402ce5e8
line wrap: on
line diff
--- a/roundup/roundupdb.py	Thu Sep 04 23:46:09 2003 +0000
+++ b/roundup/roundupdb.py	Thu Sep 18 07:29:56 2003 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: roundupdb.py,v 1.86 2003-04-27 02:24:37 richard Exp $
+# $Id: roundupdb.py,v 1.86.2.1 2003-09-18 07:29:56 kedder Exp $
 
 __doc__ = """
 Extending hyperdb with types specific to issue-tracking.
@@ -427,8 +427,14 @@
                 continue
             if key in ('activity', 'creator', 'creation'):
                 continue
-            new_value = cl.get(nodeid, key)
+            # not all keys from oldvalues might be available in database
+            # this happens when property was deleted
+            try:                
+                new_value = cl.get(nodeid, key)
+            except KeyError:
+                continue
             # the old value might be non existent
+            # this happens when property was added
             try:
                 old_value = oldvalues[key]
                 if type(new_value) is type([]):

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