Mercurial > p > roundup > code
diff roundup/roundupdb.py @ 1812:6f3b92a817aa
fixed Apply Error that was raised when property was deleted from class...
...and we are trying to edit an instance.
| author | Andrey Lebedev <kedder@users.sourceforge.net> |
|---|---|
| date | Tue, 16 Sep 2003 16:12:38 +0000 |
| parents | a3b1b1dcf639 |
| children | 4ac11e7fa11a |
line wrap: on
line diff
--- a/roundup/roundupdb.py Mon Sep 15 19:37:28 2003 +0000 +++ b/roundup/roundupdb.py Tue Sep 16 16:12:38 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.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 @@ 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([]):
