Skip to content

Commit 33e6dd8

Browse files
author
Richard Jones
committed
merge from HEAD
1 parent 3abd3a0 commit 33e6dd8

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
@@ -12,6 +12,7 @@ Fixed:
1212
notes)
1313
- don't set the title to nothing from incoming mail (thanks Bruce Guenter)
1414
- fix py2.4 strftime() API change bug (sf bug 1087746)
15+
- fix indexer searching with no valid words (sf bug 1086787)
1516

1617

1718
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.27.2.13 2004-11-26 00:00:32 richard Exp $
18+
# $Id: db_test_base.py,v 1.27.2.14 2005-01-03 03:24:48 richard Exp $
1919

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

@@ -656,6 +656,7 @@ def testIndexerSearching(self):
656656
i1 = self.db.issue.create(files=[f1, f2], title="flebble plop")
657657
i2 = self.db.issue.create(title="flebble the frooz")
658658
self.db.commit()
659+
self.assertEquals(self.db.indexer.search([], self.db.issue), {})
659660
self.assertEquals(self.db.indexer.search(['hello'], self.db.issue),
660661
{i1: {'files': [f1]}})
661662
self.assertEquals(self.db.indexer.search(['world'], self.db.issue), {})

0 commit comments

Comments
 (0)