Mercurial > p > roundup > code
diff roundup/backends/rdbms_common.py @ 2690:9054d546fc9f
Class.get(): return default if rdbms value is None (i.e. unset).
fixes testFileClassReindexing for sqlite and probably other sql backends.
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Sun, 26 Sep 2004 14:03:49 +0000 |
| parents | d68a444fcce3 |
| children | 4008af78746a |
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py Sun Sep 26 13:25:55 2004 +0000 +++ b/roundup/backends/rdbms_common.py Sun Sep 26 14:03:49 2004 +0000 @@ -1,4 +1,4 @@ -# $Id: rdbms_common.py,v 1.128 2004-07-28 05:00:32 richard Exp $ +# $Id: rdbms_common.py,v 1.129 2004-09-26 14:03:49 a1s Exp $ ''' Relational database (SQL) backend common code. Basics: @@ -1434,7 +1434,9 @@ # get the property (raises KeyErorr if invalid) prop = self.properties[propname] - if not d.has_key(propname): + # XXX may it be that propname is valid property name + # (above error is not raised) and not d.has_key(propname)??? + if (not d.has_key(propname)) or (d[propname] is None): if default is self._marker: if isinstance(prop, Multilink): return []
