Mercurial > p > roundup > code
diff roundup/backends/back_anydbm.py @ 2438:d067a4a7ace9 maint-0.7
merge from HEAD
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 10 Jun 2004 06:58:03 +0000 |
| parents | d96652862f1d |
| children | ce7cfd3ac27b |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Wed Jun 09 22:49:48 2004 +0000 +++ b/roundup/backends/back_anydbm.py Thu Jun 10 06:58:03 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.146.2.6 2004-06-09 06:54:24 richard Exp $ +#$Id: back_anydbm.py,v 1.146.2.7 2004-06-10 06:58:03 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 @@ -1741,6 +1741,7 @@ # add sorting information to the match entries directions = [] + JPROPS = {'actor':1, 'activity':1, 'creator':1, 'creation':1} for dir, prop in sort, group: if dir is None or prop is None: continue @@ -1760,11 +1761,16 @@ try: v = item[prop] except KeyError: - # the node doesn't have a value for this property - if isinstance(propclass, Multilink): v = [] - else: v = None - entry.insert(0, v) - continue + if JPROPS.has_key(prop): + # force lookup of the special journal prop + v = self.get(itemid, prop) + else: + # the node doesn't have a value for this + # property + if isinstance(propclass, Multilink): v = [] + else: v = None + entry.insert(0, v) + continue # missing (None) values are always sorted first if v is None:
