Mercurial > p > roundup > code
diff roundup/backends/back_anydbm.py @ 2892:2eae5848912d
always honor indexme property on Strings (patch [SF#063711])
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 10 Nov 2004 22:22:59 +0000 |
| parents | 402d6d556558 |
| children | 09a4d6dd6dcb |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Wed Nov 10 08:58:47 2004 +0000 +++ b/roundup/backends/back_anydbm.py Wed Nov 10 22:22:59 2004 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_anydbm.py,v 1.173 2004-10-08 05:37:44 richard Exp $ +#$Id: back_anydbm.py,v 1.174 2004-11-10 22:22:58 richard Exp $ '''This module defines a backend that saves the hyperdatabase in a database chosen by anydbm. It is guaranteed to always be available in python versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several @@ -884,7 +884,9 @@ elif isinstance(prop, String): if type(value) != type('') and type(value) != type(u''): raise TypeError, 'new property "%s" not a string'%key - self.db.indexer.add_text((self.classname, newid, key), value) + if prop.indexme: + self.db.indexer.add_text((self.classname, newid, key), + value) elif isinstance(prop, Password): if not isinstance(value, password.Password): @@ -1205,8 +1207,9 @@ elif isinstance(prop, String): if value is not None and type(value) != type('') and type(value) != type(u''): raise TypeError, 'new property "%s" not a string'%propname - self.db.indexer.add_text((self.classname, nodeid, propname), - value) + if prop.indexme: + self.db.indexer.add_text((self.classname, nodeid, propname), + value) elif isinstance(prop, Password): if not isinstance(value, password.Password):
