Skip to content

Commit 28d19c0

Browse files
author
Andrey Lebedev
committed
fixed Apply Error that was raised when property was deleted from class...
...and we are trying to edit an instance.
1 parent 929e7d8 commit 28d19c0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

roundup/roundupdb.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: roundupdb.py,v 1.90 2003-09-08 20:39:18 jlgijsbers Exp $
18+
# $Id: roundupdb.py,v 1.91 2003-09-16 16:12:38 kedder Exp $
1919

2020
__doc__ = """
2121
Extending hyperdb with types specific to issue-tracking.
@@ -415,8 +415,14 @@ def generateChangeNote(self, nodeid, oldvalues):
415415
continue
416416
if key in ('activity', 'creator', 'creation'):
417417
continue
418-
new_value = cl.get(nodeid, key)
418+
# not all keys from oldvalues might be available in database
419+
# this happens when property was deleted
420+
try:
421+
new_value = cl.get(nodeid, key)
422+
except KeyError:
423+
continue
419424
# the old value might be non existent
425+
# this happens when property was added
420426
try:
421427
old_value = oldvalues[key]
422428
if type(new_value) is type([]):

0 commit comments

Comments
 (0)