1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- #$Id: back_anydbm.py,v 1.146.2.6 2004-06-09 06:54:24 richard Exp $
18+ #$Id: back_anydbm.py,v 1.146.2.7 2004-06-10 06:58:03 richard Exp $
1919'''This module defines a backend that saves the hyperdatabase in a
2020database chosen by anydbm. It is guaranteed to always be available in python
2121versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several
@@ -1741,6 +1741,7 @@ def filter(self, search_matches, filterspec, sort=(None,None),
17411741
17421742 # add sorting information to the match entries
17431743 directions = []
1744+ JPROPS = {'actor' :1 , 'activity' :1 , 'creator' :1 , 'creation' :1 }
17441745 for dir , prop in sort , group :
17451746 if dir is None or prop is None :
17461747 continue
@@ -1760,11 +1761,16 @@ def filter(self, search_matches, filterspec, sort=(None,None),
17601761 try :
17611762 v = item [prop ]
17621763 except KeyError :
1763- # the node doesn't have a value for this property
1764- if isinstance (propclass , Multilink ): v = []
1765- else : v = None
1766- entry .insert (0 , v )
1767- continue
1764+ if JPROPS .has_key (prop ):
1765+ # force lookup of the special journal prop
1766+ v = self .get (itemid , prop )
1767+ else :
1768+ # the node doesn't have a value for this
1769+ # property
1770+ if isinstance (propclass , Multilink ): v = []
1771+ else : v = None
1772+ entry .insert (0 , v )
1773+ continue
17681774
17691775 # missing (None) values are always sorted first
17701776 if v is None :
0 commit comments