Skip to content

Commit 68f4844

Browse files
author
Richard Jones
committed
merge from HEAD
1 parent fc9bd68 commit 68f4844

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

CHANGES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
This file contains the changes to the Roundup system over time. The entries
22
are given with the most recent entry first.
33

4+
2004-06-10 0.7.5
5+
Fixed:
6+
- force lookup of journal props in anydbm filtering
7+
8+
49
2004-06-10 0.7.4
510
Fixed:
611
- re-acquire the OTK manager when we re-open the database

roundup/backends/back_anydbm.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
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
2020
database chosen by anydbm. It is guaranteed to always be available in python
2121
versions >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

Comments
 (0)