Code

fixed Apply Error that was raised, when property was deleted from class and we are...
authorkedder <kedder@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 16 Sep 2003 16:12:38 +0000 (16:12 +0000)
committerkedder <kedder@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 16 Sep 2003 16:12:38 +0000 (16:12 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1879 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/roundupdb.py

index 417067bf1b4a2e6d91ecfb64b581d2c3cc0ff7e1..7edc5af292bae7f483ba842d7dc15fa83b1e0850 100644 (file)
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: roundupdb.py,v 1.90 2003-09-08 20:39:18 jlgijsbers Exp $
+# $Id: roundupdb.py,v 1.91 2003-09-16 16:12:38 kedder Exp $
 
 __doc__ = """
 Extending hyperdb with types specific to issue-tracking.
@@ -415,8 +415,14 @@ class IssueClass:
                 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([]):