From: richard Date: Wed, 3 Apr 2002 07:05:50 +0000 (+0000) Subject: d'oh! killed retirement of nodes :( X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3b9c31f07f0f7790580cc62a2320ef533517882a;p=roundup.git d'oh! killed retirement of nodes :( all better now... git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@693 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/hyperdb.py b/roundup/hyperdb.py index 404cd7c..a58e7ef 100644 --- a/roundup/hyperdb.py +++ b/roundup/hyperdb.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: hyperdb.py,v 1.61 2002-04-03 06:11:51 richard Exp $ +# $Id: hyperdb.py,v 1.62 2002-04-03 07:05:50 richard Exp $ __doc__ = """ Hyperdatabase implementation, especially field types. @@ -179,6 +179,13 @@ transaction. properties = self.getclass(classname).getprops() d = {} for k, v in node.items(): + # if the property doesn't exist, or is the "retired" flag then + # it won't be in the properties dict + if not properties.has_key(k): + d[k] = v + continue + + # get the property spec prop = properties[k] if isinstance(prop, Password): @@ -203,10 +210,15 @@ transaction. properties = self.getclass(classname).getprops() d = {} for k, v in node.items(): - # avoid properties that don't exist any more + # if the property doesn't exist, or is the "retired" flag then + # it won't be in the properties dict if not properties.has_key(k): + d[k] = v continue + + # get the property spec prop = properties[k] + if isinstance(prop, Date) and v is not None: d[k] = date.Date(v) elif isinstance(prop, Interval) and v is not None: @@ -1115,6 +1127,9 @@ def Choice(name, db, *options): # # $Log: not supported by cvs2svn $ +# Revision 1.61 2002/04/03 06:11:51 richard +# Fix for old databases that contain properties that don't exist any more. +# # Revision 1.60 2002/04/03 05:54:31 richard # Fixed serialisation problem by moving the serialisation step out of the # hyperdb.Class (get, set) into the hyperdb.Database.