From ca1a13b24e3b32035065128530c9ef8bd314d68e Mon Sep 17 00:00:00 2001 From: kedder Date: Tue, 16 Sep 2003 16:12:38 +0000 Subject: [PATCH] fixed Apply Error that was raised, when property was deleted from class and we are trying to edit an instance. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1879 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/roundupdb.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py index 417067b..7edc5af 100644 --- a/roundup/roundupdb.py +++ b/roundup/roundupdb.py @@ -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([]): -- 2.30.2