# HG changeset patch # User Richard Jones # Date 1031023706 0 # Node ID a9a73d4e78b9efc3c5b524a2c28e3e01cdb7f65e # Parent cfc694864143118fc7f6a629d9d98f26ef893e01 fixes to property editing through the web diff -r cfc694864143 -r a9a73d4e78b9 CHANGES.txt --- a/CHANGES.txt Tue Sep 03 03:09:30 2002 +0000 +++ b/CHANGES.txt Tue Sep 03 03:28:26 2002 +0000 @@ -8,6 +8,7 @@ . #600700 ] doc/upgrading.txt: no info about 0.4.3 . #603696 ] Mail followup not inserted . #603703 ] way to unassign issues + . some more fixes to property editing through the web 2002-07-25 0.4.3 diff -r cfc694864143 -r a9a73d4e78b9 roundup/hyperdb.py --- a/roundup/hyperdb.py Tue Sep 03 03:09:30 2002 +0000 +++ b/roundup/hyperdb.py Tue Sep 03 03:28:26 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: hyperdb.py,v 1.69.2.2 2002-09-03 02:55:26 richard Exp $ +# $Id: hyperdb.py,v 1.69.2.3 2002-09-03 03:28:26 richard Exp $ __doc__ = """ Hyperdatabase implementation, especially field types. @@ -397,7 +397,7 @@ raise KeyError, '"%s" has no property "%s"'%(self.classname, key) - if isinstance(prop, Link): + if value is not None and isinstance(prop, Link): if type(value) != type(''): raise ValueError, 'link value must be String' link_class = self.properties[key].classname @@ -589,16 +589,18 @@ if isinstance(prop, Link): link_class = self.properties[key].classname # if it isn't a number, it's a key - if type(value) != type(''): - raise ValueError, 'link value must be String' - if not num_re.match(value): + if value is not None and not isinstance(value, type('')): + raise ValueError, 'property "%s" link value be a string'%( + key) + if isinstance(value, type('')) and not num_re.match(value): try: value = self.db.classes[link_class].lookup(value) except (TypeError, KeyError): raise IndexError, 'new property "%s": %s not a %s'%( key, value, self.properties[key].classname) - if not self.db.hasnode(link_class, value): + if (value is not None and + not self.db.getclass(link_class).hasnode(value)): raise IndexError, '%s has no node %s'%(link_class, value) if self.properties[key].do_journal: @@ -1188,6 +1190,9 @@ # # $Log: not supported by cvs2svn $ +# Revision 1.69.2.2 2002/09/03 02:55:26 richard +# bug in multilink meant changes might not be detected correctly +# # Revision 1.69.2.1 2002/07/10 06:30:47 richard # . #571170 ] gdbm deadlock #