Skip to content

Commit c792c2e

Browse files
author
Richard Jones
committed
fixed RDBMS filter() for no matches from full-text search [SF#990778]
1 parent f97e2fd commit c792c2e

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Feature:
1515
from Vickenty Fesunov)
1616
- hide "(list)" popup links when issue is only viewable
1717
- roundup-server options -g and -u accept both ids and names (sf bug 983769)
18+
- added mod_python interface (see installation.txt)
1819

1920

2021
2004-??-?? 0.7.6
@@ -26,6 +27,7 @@ Fixed:
2627
- fix dates-from-Dates (sf bug 984604)
2728
- fix messageid generated when msgid is None for send_message (sf bug 987933)
2829
- make user permissions check more sane (fix search page for anonymous)
30+
- fixed RDBMS filter() for no matches from full-text search (sf bug 990778)
2931

3032

3133
2004-06-24 0.7.5

roundup/backends/back_mysql.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,10 @@ def filter(self, search_matches, filterspec, sort=(None,None),
496496
property value to match is a list, any one of the values in the
497497
list may match for that property to match.
498498
'''
499+
# we can't match anything if search_matches is empty
500+
if search_matches == {}:
501+
return []
502+
499503
if __debug__:
500504
start_t = time.time()
501505

roundup/backends/rdbms_common.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: rdbms_common.py,v 1.121 2004-07-05 11:37:10 a1s Exp $
1+
# $Id: rdbms_common.py,v 1.122 2004-07-19 00:36:31 richard Exp $
22
''' Relational database (SQL) backend common code.
33
44
Basics:
@@ -1984,6 +1984,10 @@ def filter(self, search_matches, filterspec, sort=(None,None),
19841984
property value to match is a list, any one of the values in the
19851985
list may match for that property to match.
19861986
'''
1987+
# we can't match anything if search_matches is empty
1988+
if search_matches == {}:
1989+
return []
1990+
19871991
if __debug__:
19881992
start_t = time.time()
19891993

0 commit comments

Comments
 (0)