Skip to content

Commit 2d3b384

Browse files
author
Richard Jones
committed
merge from HEAD
1 parent e5451d3 commit 2d3b384

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Fixed:
6969
- fix some security assertions (sf bug 1085481)
7070
- don't set the title to nothing from incoming mail (thanks Bruce Guenter)
7171
- fix py2.4 strftime() API change bug (sf bug 1087746)
72+
- fix indexer searching with no valid words (sf bug 1086787)
7273

7374

7475
2004-10-26 0.7.9

roundup/backends/indexer_rdbms.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ def find(self, wordlist):
7474
If none are found return an empty dictionary
7575
* more rules here
7676
'''
77+
if not wordlist:
78+
return {}
79+
7780
l = [word.upper() for word in wordlist if 26 > len(word) > 2]
7881

7982
a = ','.join([self.db.arg] * len(l))

test/db_test_base.py

Lines changed: 2 additions & 1 deletion
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: db_test_base.py,v 1.55 2004-11-26 00:01:04 richard Exp $
18+
# $Id: db_test_base.py,v 1.55.2.1 2005-01-03 03:23:38 richard Exp $
1919

2020
import unittest, os, shutil, errno, imp, sys, time, pprint
2121

@@ -698,6 +698,7 @@ def testIndexerSearching(self):
698698
i1 = self.db.issue.create(files=[f1, f2], title="flebble plop")
699699
i2 = self.db.issue.create(title="flebble the frooz")
700700
self.db.commit()
701+
self.assertEquals(self.db.indexer.search([], self.db.issue), {})
701702
self.assertEquals(self.db.indexer.search(['hello'], self.db.issue),
702703
{i1: {'files': [f1]}})
703704
self.assertEquals(self.db.indexer.search(['world'], self.db.issue), {})

0 commit comments

Comments
 (0)