Skip to content

Commit bdcaf7d

Browse files
author
Richard Jones
committed
don't match retired items in RDBMS stringFind
1 parent eb2990d commit bdcaf7d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Fixed:
66
- paging in classhelp popup was broken
77
- socket timeout error logging can fail
88
- hyperlink designators in message display (sf bug 931828)
9+
- don't match retired items in RDBMS stringFind
910

1011

1112
2004-04-01 0.6.8

roundup/backends/rdbms_common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: rdbms_common.py,v 1.58.2.4 2004-03-31 01:13:22 richard Exp $
1+
# $Id: rdbms_common.py,v 1.58.2.5 2004-04-12 23:50:04 richard Exp $
22
''' Relational database (SQL) backend common code.
33
44
Basics:
@@ -1726,6 +1726,9 @@ def stringFind(self, **requirements):
17261726

17271727
# generate the where clause
17281728
s = ' and '.join(['lower(_%s)=%s'%(col, self.db.arg) for col in where])
1729+
# don't match retired items
1730+
s = s + ' and __retired__ <> %s'%self.db.arg
1731+
args.append(1)
17291732
sql = 'select id from _%s where %s'%(self.classname, s)
17301733
self.db.sql(sql, tuple(args))
17311734
l = [x[0] for x in self.db.sql_fetchall()]

0 commit comments

Comments
 (0)